Friday, October 27, 2006

SIGSEGV Running Standalone BOINC Application

Here is part of an email I sent to the boinc-projects mailing list:
I am beginning work on a BOINC project and have built and installed BOINC stable. It seems to work fine, attaching to projects and doing work. But, when I try to compile and run a BOINC app standalone I invariably get a seg. fault in diagnostics_init. This has happened both with Eric Myer's 'hello' program and with 'uppercase'. Running uppercase produces a stderr.txt with the following contents:
SIGSEGV: segmentation violationStack trace (9 frames):
./upper_case[0x8051224]
[0x462420]
/lib/libc.so.6(index+0x63)[0x4be0ac33]
./upper_case(_ZN7MIOFILE5fgetsEPci+0x61)[0x8053ba1]
./upper_case(diagnostics_init+0x27a)[0x805169a]
./upper_case(boinc_init_diagnostics+0x34)[0x8051934]
./upper_case(main+0x2d)[0x804cd45]
/lib/libc.so.6(__libc_start_main+0xdc)[0x4bdb4f2c]
./upper_case(__gxx_personality_v0+0xdd)[0x804cc41]

Exiting...
...
Basically buf in MIOFILE is NULL, because because diagnostics_init has done an fopen and passed the results to MIOFILE::init_file. This sets f but not buf.
The response I received from Nicolas Alvarez was:
I'm not sure why this happens in standalone mode, but try creating an
empty file 'init_data.xml' and running app again.
This seemed to get me past this first problem.

No comments: