Tuesday, September 16, 2014

com.serverengines.rdr.EndOfStream: EndOfStream ILO

There is some bug in ILO implementation on HP servers. Its very frustrating, even more when you are in hurry



Fastest way around this is to point your browser to: IP_ADDRESS/M2.JAR and download jar to your computer.

It should connect without problems now.


how to check for debug symbols on osx ?

After last submission of my py2app app to Mac App Store I've received email:



Missing DWARF data - Your app does not include DWARF data with architecture information in Contents/MacOS/Capturebox . In your Xcode build settings, ensure that the debug information is set to "DWARF with dSYM" and that the list of valid architectures does not include PPC.


When creating .app file with py2app be sure to set:

no_strip: True 

in your py2app options.


Existence of debug symbols could be easily checked with otool utility:

otool -Iv /Applications/Calculator.app/Contents/MacOS/Calculator

/Applications/Calculator.app/Contents/MacOS/Calculator:
Indirect symbols for (__TEXT,__stubs) 27 entries
address            index name
0x000000010000f454     8 _CalculateExpression
0x000000010000f45a    14 _NSClassFromString
0x000000010000f460    18 _NSHomeDirectory
....


If there is no output from otool debug symbols were probably removed by strip or some other tool.




Friday, September 12, 2014

taking core dumps on osx (python segmentation fault 11)


so you are testing some python code, suddenly:

imac-sebcia:CaptureboxApp sebcio$ python boot_darwin.py
2014-09-13 00:07:59.795 Python[2130:d07] __main__(): running in --debug mode
2014-09-12 23:27:46.749 Python[1746:d07] buildLatestScreensMenu(): end
Segmentation fault: 11

random segmentation faults in python could be very frustrating. how to trace them on osx ?

1. core dumps are not enabled by default on osx. enable them with:

ulimit -c unlimited

2. run your code again:

imac-sebcia:CaptureboxApp sebcio$ python boot_darwin.py
2014-09-13 00:07:59.795 Python[2130:d07] __main__(): running in --debug mode
2014-09-12 23:27:46.749 Python[1746:d07] buildLatestScreensMenu(): end
Segmentation fault: 11 (core dumped)

3. all core dumps are saved in /cores

imac-sebcia:~ sebcio$ ls -la /cores
total 3461280
drwxrwxr-t@  3 root    admin         102 13 wrz 00:08 .
drwxr-xr-x  34 root    wheel        1224 12 wrz 19:42 ..
-r--------   1 sebcio  admin  1772175360 13 wrz 00:09 core.2132

4. analyze core dump with lldb:

imac-sebcia:cores sebcio$ lldb -c core.2132
Core file '/cores/core.2132' (x86_64) was loaded.
Process 0 stopped
* thread #1: tid = 0x0000, 0x00007fff89cca097 libobjc.A.dylib`objc_msgSend + 23, stop reason = signal SIGSTOP
    frame #0: 0x00007fff89cca097 libobjc.A.dylib`objc_msgSend + 23
libobjc.A.dylib`objc_msgSend + 23:
-> 0x7fff89cca097:  andl   0x18(%r11), %r10d
   0x7fff89cca09b:  shlq   $0x4, %r10
   0x7fff89cca09f:  addq   0x10(%r11), %r10
   0x7fff89cca0a3:  cmpq   (%r10), %rsi
  thread #2: tid = 0x0001, 0x00007fff8e8d0662 libsystem_kernel.dylib`kevent64 + 10, stop reason = signal SIGSTOP
    frame #0: 0x00007fff8e8d0662 libsystem_kernel.dylib`kevent64 + 10
libsystem_kernel.dylib`kevent64 + 10:
-> 0x7fff8e8d0662:  jae    0x7fff8e8d066c            ; kevent64 + 20
   0x7fff8e8d0664:  movq   %rax, %rdi
   0x7fff8e8d0667:  jmpq   0x7fff8e8cc175            ; cerror_nocancel
   0x7fff8e8d066c:  ret
  thread #3: tid = 0x0002, 0x00007fff8e8cfe6a libsystem_kernel.dylib`__work

....