These are chat archives for arnaud-lb/php-rdkafka

24th
Nov 2016
Paul Dragoonis
@dragoonis
Nov 24 2016 12:42
@edenhill How do I get a 'core' file dumped onto disk when the segfault happens?
Trying to debug a segfault at my end, but ain't got a 'core' file.
This is from the PHP CLI btw, no apache/fpm here.
Magnus Edenhill
@edenhill
Nov 24 2016 12:42
ulimit -c unlimited
Paul Dragoonis
@dragoonis
Nov 24 2016 12:43
Yes, I ran that.
Magnus Edenhill
@edenhill
Nov 24 2016 12:43
make sure the current directory is writable and there is no core file already
Paul Dragoonis
@dragoonis
Nov 24 2016 12:43
done.
Magnus Edenhill
@edenhill
Nov 24 2016 12:43
after that: YMMV depending on OS
Paul Dragoonis
@dragoonis
Nov 24 2016 12:46

i done

gdb `which php`

Then it says: Reading symbols from /usr/bin/php...(no debugging symbols found)...done.

I got something with strace
Magnus Edenhill
@edenhill
Nov 24 2016 12:59
strace typically isnt usable for tracking down segfaults, it will only show syscalls so it is too coarse grained
what did 'bt' in gdb say?
Paul Dragoonis
@dragoonis
Nov 24 2016 13:02
@edenhill i figured it out. It's nothing to do with kafka.
If you have a class constant, and you refer to it using the wrong case (like all lowercase, when it's defined as uppercase) PHP5.6 segfaults
Paul Dragoonis
@dragoonis
Nov 24 2016 14:36
5.6.15 segfaults but 5.6.28 does not - must have been patched :)