4

I'm running PHP CLI commands inside an Ubuntu VM via SSH. The problem is that certain commands have started causing segmentation faults.

Oddly, it only happens when the command is run via SSH. If I run it directly inside the VM, there's no problem. Also, it doesn't happen on another machine running the same VM.

When I run the PHP command (via SSH from the host machine), the only thing I see in the logs on the VM is this:

Mar 22 14:53:00 local kernel: [ 1868.863475] php[4967]: segfault at 7ff60c200000 ip 00007ff6202b284e sp 00007ffce7f19448 error 4 in libc-2.23.so[7ff620213000+1c0000]

This seems to indicate that the problem is actually not with PHP, but with the standard library. If that's the case, how can I go about debugging this, and/or how should I submit a bug report?

Details, if they're relevant:

My host machine is also Ubuntu, and the VM is DrupalVM using the beet/box base box. The command I'm actually running is blt setup (see https://github/acquia/blt), which calls drush cex inside the VM via SSH.

It's this drush cex command that recently started causing the seg fault.

Dane Powell
  • 621
  • 7
  • 13

1 Answers1

0

First option:

strace mycommand

...and watch what happens

Second option

gdb mycommand

...and step through it

Third option

gather the dumps and analyze them.
- https://stackoverflow.com/questions/17965/how-to-generate-a-core-dump-in-linux-on-a-segmentation-fault

The first one is usually sufficient if you have some intuition about what's going on. In your case it's probably something silly like terminal capability negotioation or some other nor-really-core-relevant thing, but you never know.... could be serious.

Second option is the most complicated.