0

i have some php-script that shell_execute some bash-script. In this bash I start a Xvfb-Session and start some firefox in it and take a screenshot and then kill firefox and xvfb again. Its on an Ubuntu 14.04 server.

It was running perfect until I updated to Mozilla Firefox 52.0.1 on Ubuntu 14.04.

But since firefox update Suddenly firefox is crashing and writing lot of things into /var/log/kern.log and /var/log/syslog

Mar 22 11:29:12 vmd4390 kernel: [4406567.876304] Chrome_ChildThr[2469]: segfault at 0 ip 00007f151faf6c04 sp 00007f15105fe410 error 6 in plugin-container[7f151faf2000+1a000]
Mar 22 11:35:14 vmd4390 kernel: [4406929.195398] Chrome_ChildThr[2721]: segfault at 0 ip 00007fe8ef82cc04 sp 00007fe8e03fe410 error 6 in plugin-container[7fe8ef828000+1a000]
Mar 22 11:36:14 vmd4390 kernel: [4406989.871059] Chrome_ChildThr[2867]: segfault at 0 ip 00007fd880e0ac04 sp 00007fd8719fe410 error 6 in plugin-container[7fd880e06000+1a000]
Mar 22 11:37:15 vmd4390 kernel: [4407050.509036] Chrome_ChildThr[3014]: segfault at 0 ip 00007f9f15592c04 sp 00007f9f060fe410 error 6 in plugin-container[7f9f1558e000+1a000]
Mar 22 11:38:16 vmd4390 kernel: [4407111.606671] Chrome_ChildThr[3125]: segfault at 0 ip 00007f86977aac04 sp 00007f86882fe410 error 6 in plugin-container[7f86977a6000+1a000]
Mar 22 11:39:17 vmd4390 kernel: [4407172.356265] Chrome_ChildThr[3272]: segfault at 0 ip 00007f0f434c9c04 sp 00007f0f33ffe410 error 6 in plugin-container[7f0f434c5000+1a000]
Mar 22 11:40:37 vmd4390 kernel: [4407252.060993] firefox[3409]: segfault at 0 ip 00007f5b5fd9d2b2 sp 00007ffee6078cf8 error 4 in libxul.so[7f5b5f3f3000+3e6d000]
Mar 22 11:46:38 vmd4390 kernel: [4407613.213520] firefox[3529]: segfault at 0 ip 00007fb40b19d2b2 sp 00007fff70acd458 error 4 in libxul.so[7fb40a7f3000+3e6d000]
Mar 22 11:53:45 vmd4390 kernel: [4408040.293350] firefox[3581]: segfault at 0 ip 00007f8e5c79d2b2 sp 00007ffd6fe22ac8 error 4 in libxul.so[7f8e5bdf3000+3e6d000]
Mar 22 14:20:18 vmd4390 kernel: [4416833.631493] firefox[4020]: segfault at 0 ip 00007f4bee99d2b2 sp 00007ffeb8ac3718 error 4 in libxul.so[7f4bedff3000+3e6d000]
Mar 22 14:30:54 vmd4390 kernel: [4417469.726500] firefox[4158]: segfault at 0 ip 00007fd45d09d2b2 sp 00007ffc57234588 error 4 in libxul.so[7fd45c6f3000+3e6d000]

It still runs perfect when i call this php-script on console with "php5-cgi test.php". But when i call it from browser via lightttpd it is crashing firefox suddenly.

In this firefox there is new that there is some plugin-container process. before everything was in one firefox process.

php-Script:

$token = date('Y-m-d-H-i-s') . '-a1sf24df4asd54';
$url = 'https://www.my-url.com';
$screenNo = (int) date('i') + 30;

$PID = shell_exec('./start-run-preview.sh ' . escapeshellarg($url) . ' ' . escapeshellarg($name) . ' 60 ' . $screenNo . ' ' . escapeshellarg($token) . ' >> logs/'.$token.'.log 2>&1 &');
echo 'Screen: ' . $screenNo . PHP_EOL;
exit;

start-run-preview.sh

echo "Starting XVFB on $XVFB_DISPLAY"
Xvfb :${XVFB_DISPLAY} -screen 0 ${XVFB_RES_WIDTH}x${XVFB_RES_HEIGHT}x24 -noreset -nolisten tcp 2> /dev/null &
XVFB_PID=$!

# Remove parent lock to prevent error message "firefox has been shutdown unexpectly..."
rm ~/.mozilla/firefox/${FF_PROFILE_DIR}/.parentlock

echo "Running firefox -profile ${FF_PROFILE_DIR} on $XVFB_DISPLAY "
DISPLAY=:${XVFB_DISPLAY} firefox -profile ~/.mozilla/firefox/${FF_PROFILE_DIR} -width $XVFB_RES_WIDTH -height $XVFB_RES_HEIGHT "$FF_URL" > /dev/null &
FF_PID=$!

echo "firefox running on PID $FF_PID"

I tried to disable flash plugin already in this used firefox profile, but it did not help. I don't know anymore what to do or where to locate the problem.

Andi S.
  • 317
  • 1
  • 11
  • PHP/Firefox shouldn't segfault, so please try again with an up-to-date system. – Tatsuyuki Ishi Mar 24 '17 at 07:01
  • You mean its a Problem of how the OS is handling this situation? Its running on Ubunut 14.04 server. – Andi S. Mar 24 '17 at 07:06
  • Ubuntu 14.04 is somewhat old, although I don't expect the maintainer are breaking the things. Please do a `apt-get update && apt-get upgrade`. – Tatsuyuki Ishi Mar 24 '17 at 07:07
  • I did already yesterday, thats how i got this new firefox version. But undoing it is not that easy. Some packages he did not upgrade and hold back: ffmpeg libav-tools libavcodec-extra-54 linux-generic linux-headers-generic linux-headers-server linux-image-generic linux-serve – Andi S. Mar 24 '17 at 07:15
  • Having packages holded back is a nasty thing. Please check if you have any potentially outdated 3rd party repositories. See [here](http://askubuntu.com/questions/601/the-following-packages-have-been-kept-back-why-and-how-do-i-solve-it) for possible solutions. – Tatsuyuki Ishi Mar 24 '17 at 07:17
  • I did like you said. I risked a dist-upgrade and installed all outstanding packages. But problem still existing. It looks like firefox is not able to spawn the plugin-container process when i called this script via browser. – Andi S. Mar 24 '17 at 07:35

0 Answers0