0

I'm trying to run gpg from my php script using exec(). But it chashes with segmentation fault: "gpg: Segmentation fault caught ... exiting" It crashes within a child process so my php script works ok. To identify a problem I wanna get a core file. I tried to run

ulimit -c unlimited
echo 1 > /proc/sys/fs/suid_dumpable

I added "* soft core unlimited" to /etc/security/limits.conf but no core files have been created.

I would be very thankful for any advice or ideas.

amit kumar
  • 20,438
  • 23
  • 90
  • 126
user101159
  • 111
  • 1
  • 6

2 Answers2

1

From the output message, it seems gpg catches the exception (is this true?).

You can try the gcore command if applicable. Otherwise, if the source code is available (which I assume is, as you are debugging it), you may use, for example, google-coredumper. Not sure if this is sufficient for you though.

amit kumar
  • 20,438
  • 23
  • 90
  • 126
  • I have the sources but I can't understand how google-coredumper may help me. It's able to dump in certain place in the code but I don't know that certain place where it crashes. – user101159 Mar 03 '10 at 12:40
  • 1
    @sfoid Another option is to try to run it with valgrind, which may point out the error. Looks like a tricky problem. – amit kumar Mar 03 '10 at 14:24
0

May be you can start to think that your problem can be gpg catch some exceptions or PERMISSION issues. Check it first.

Hope this help

deddihp
  • 653
  • 1
  • 6
  • 17