Bug 215500 - astro/google-earth crashes on 11.0 (caught signal 6 or 11)
Summary: astro/google-earth crashes on 11.0 (caught signal 6 or 11)
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-22 22:07 UTC by freebsd
Modified: 2018-01-23 09:58 UTC (History)
3 users (show)

See Also:


Attachments
Crashlog created by Google earth (1.68 KB, text/plain)
2016-12-22 22:07 UTC, freebsd
no flags Details
glxinfo (39.62 KB, text/plain)
2016-12-27 13:14 UTC, freebsd
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd 2016-12-22 22:07:29 UTC
Created attachment 178211 [details]
Crashlog created by Google earth

On FreeBSD 11.0-p5 Google Earth crashes directly after the start (After the splash screen I see the main window pop up for just a fraction of a second). This is the console output:

Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig error: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 72: non-double matrix element
Fontconfig warning: "/etc/fonts/conf.d/10-scale-bitmap-fonts.conf", line 80: saw unknown, expected number
[1222/230006:ERROR:net_util.cc(2195)] Not implemented reached in bool net::HaveOnlyLoopbackAddresses()
Failed to load "/compat/linux/opt/google/earth/free/libinput_plugin.so" because "/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.17' not found (required by ./libLeap.so)"
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230007:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230008:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230008:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230008:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
[1222/230008:ERROR:nss_ocsp.cc(581)] No URLRequestContext for OCSP handler.
pthread create thread: Resource temporarily unavailable
Google Earth has caught signal 6.



We apologize for the inconvenience, but Google Earth has crashed.
 This is a bug in the program, and should never happen under normal
 circumstances. A bug report and debugging data have been written
 to this text file:

    /usr/home/yggdrasil/.googleearth/crashlogs/crashlog-585c4ce8.txt

Please include this file if you submit a bug report to Google.


Sometimes it is signal 11 instead of 6
The mentioned crashlog file is attached

When running 10.3 google earth worked fine.
Comment 1 Tijl Coosemans freebsd_committer freebsd_triage 2016-12-26 10:45:21 UTC
Do you install binary packages or build your own from ports?  Which branch: quarterly or latest head?  Do you use nvidia-driver?  What is the output of "pkg info -x linux nvidia"?
Comment 2 freebsd 2016-12-26 11:14:22 UTC
Do you install binary packages or build your own from ports?  Which branch: quarterly or latest head?  Do you use nvidia-driver?  What is the output of "pkg info -x linux nvidia"?
There is no package, i build from latest repo. I use the nvidia driver, yes.

pkg info -x linux nvidia
linux-c6-dri-11.0.7_3
linux-c6-expat-2.0.1_3
linux-c6-fontconfig-2.8.0_1
linux-c6-libelf-0.164
linux-c6-libpciaccess-0.13.4_1
linux-c6-xorg-libs-7.4_6
linux_base-c6-6.8_6
linuxlibertine-g-20120116_1
nvidia-driver-367.44_2
nvidia-settings-355.11_3
nvidia-xconfig-367.35
Comment 3 Tijl Coosemans freebsd_committer freebsd_triage 2016-12-26 11:42:34 UTC
(In reply to freebsd from comment #2)
What is the output of 'md5 /compat/linux/usr/lib/libnvidia-tls.so.367.44'?  There are two versions of this file and the package sometimes installs the wrong one.
Comment 4 freebsd 2016-12-26 13:28:24 UTC
e0cf316ee43c6ff25b1e5f128c73cb00
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2016-12-27 11:29:45 UTC
That's the right one.  In bug 215345 somebody else also has a problem with the most recent Nvidia driver on FreeBSD 11 when trying to use linux-flashplayer.  It only seems to happen with multithreaded programs.  Could you install graphics/linux-c6-glx-utils and then run /compat/linux/usr/bin/glxgears to see if that works?  What is the output of /compat/linux/usr/bin/glxinfo?
Comment 6 freebsd 2016-12-27 13:14:56 UTC
Created attachment 178323 [details]
glxinfo
Comment 7 freebsd 2016-12-27 13:15:34 UTC
The gears run with 60 fps
Comment 8 Tijl Coosemans freebsd_committer freebsd_triage 2016-12-27 15:23:55 UTC
Dmitry, do you know how to debug this further?  There appears to be something wrong with multithreaded Linux programs and x11/nvidia-driver on FreeBSD 11.
Comment 9 Tijl Coosemans freebsd_committer freebsd_triage 2016-12-28 20:22:32 UTC
Do you have linprocfs and tmpfs mounted as explained in the linux_base-c6 pkg-message (show using "pkg info -D linux_base-c6")?
Can you also try the following commands:

% /bin/sh
$ ulimit -s 32768
$ googleearth
Comment 10 freebsd 2016-12-28 21:05:08 UTC
mount | grep linux
linprocfs on /compat/linux/proc (linprocfs, local)
tmpfs on /compat/linux/dev/shm (tmpfs, local)

running with ulimit still crashes
Comment 11 Tijl Coosemans freebsd_committer freebsd_triage 2016-12-29 17:29:42 UTC
Run 'ktrace -i googleearth' and then 'kdump -H > kdump.txt'.  Then attach kdump.txt.  (If it's too big you can compress it with xz.)
Comment 12 freebsd 2016-12-29 17:51:55 UTC
kdump.txt.xz is still to large, download it from here:
http://schukraft.org/kdump.txt.xz

Had to run it via sudo. Googleearth seemed to run way longer than before, getting to the point where it presents the Tips window and a popup complaining that it can't detect my graphics card. Thereafter it crashes as usual.
Comment 13 Tijl Coosemans freebsd_committer freebsd_triage 2016-12-30 12:56:27 UTC
Thanks, can you upload the coredump as well?
Comment 14 freebsd 2016-12-30 14:57:48 UTC
It doesn't create a core file. kern.coredump is already 1, so how do I force this?
Comment 15 Tijl Coosemans freebsd_committer freebsd_triage 2016-12-31 15:38:14 UTC
(In reply to freebsd from comment #14)
Right, it can only be done with a debugger because the signal is captured by googleearth which then generates its own crash dump.

From the kdump it looks like the problem is caused by virtual memory allocations that fail so I think you should try the ulimit thing again but with lower values: 8192, 4096, 2048.  Make sure you do this from within a /bin/sh shell, because it has no effect in csh.
Comment 16 freebsd 2016-12-31 22:32:19 UTC
Lower values (in /bin/sh) doesn't do any good either :(
If you tell me how to create a proper crashdump I'll do that.
Comment 17 Tijl Coosemans freebsd_committer freebsd_triage 2017-01-01 17:53:57 UTC
(In reply to freebsd from comment #16)
Try to limit the data segment as well:

/bin/sh
ulimit -s 8192
ulimit -d 262144
googleearth

You can probably go all the way down to 8192 or so.
Comment 18 freebsd 2017-01-01 18:08:42 UTC
ulimit -s 2048
ulimit -d 8192
googleearth crashes as before
Comment 19 Tijl Coosemans freebsd_committer freebsd_triage 2017-01-01 18:37:58 UTC
(In reply to freebsd from comment #18)
Sigh, can you generate and upload another kdump.txt with these limits?

/bin/sh
ulimit -s 8192
ulimit -d 65536
ktrace -i googleearth
kdump -H > kdump.txt
Comment 20 freebsd 2017-01-07 18:24:32 UTC
Sorry this took so long.
Now running ktrace -i googleearth as root results in a strange error now:

Warning: Unable to create symlink for lock '/root/.googleearth/instance-running-lock'.  File exists.

Deleting that file or the entire /root/.googleearth dir doesn't change the error.

Running ktrace as a regular user seems not to work as it always fails with

ktrace: ktrace.out: Operation not permitted
Comment 21 Tijl Coosemans freebsd_committer freebsd_triage 2017-01-08 10:37:24 UTC
(In reply to freebsd from comment #20)
You need to run the commands from a directory where your user has write access.  ktrace writes to a file named ktrace.out in the current directory.  kdump then processes that file into human readable text.
Comment 22 freebsd 2017-01-08 10:57:24 UTC
I'm running it as root, not sure how much more write access I can get ;) And it also worked earlier, not sure whats suddenly different.
Comment 23 Tijl Coosemans freebsd_committer freebsd_triage 2017-01-08 20:12:53 UTC
(In reply to freebsd from comment #22)
Does /compat/linux/root exist maybe?
Comment 24 freebsd 2017-01-09 10:37:47 UTC
Yes, it does. I didn't realise there's a different root for linux binaries.

http://schukraft.org/kdump2.txt.xz
Comment 25 Tijl Coosemans freebsd_committer freebsd_triage 2017-01-09 16:08:10 UTC
(In reply to freebsd from comment #24)
For a Linux program the kernel first checks /compat/linux/path/to/file before checking /path/to/file.  When the program tries to create a file or directory this can be a problem when you run as root because then the file may be created under /compat/linux.  This never happens when you run as a regular user because then you don't have write access there.

So remove /compat/linux/root and try to run googleearth as a regular user.  Maybe you should also remove ~/.googleearth from your user home directory, just in case this is a problem with a corrupted cache or something.

cd ~
/bin/sh
ulimit -s 8192
ktrace -i googleearth
kdump -H > kdump.txt
Comment 26 freebsd 2017-01-09 17:00:18 UTC
I rm'ed /compat/linux/root, /root/.googleearth, ~/.googleearth, then

sudo /bin/sh
cd
ulimit -s 8192
ktrace -i googleearth
kdump -H > kdump.txt

http://schukraft.org/kdump3.txt.xz

gives a running googleearth, but without the actual earth part rendering. It spouts a message about an "Unknown Graphics Card", then the main window pops up with everything working except the big map part.
Running googleearth as a regular user still fails.
Comment 27 Tijl Coosemans freebsd_committer freebsd_triage 2017-01-09 19:10:25 UTC
(In reply to freebsd from comment #26)
Can you do exactly the same but with "/bin/sh" instead of "sudo /bin/sh"?  Also, what is the output of "ls /compat/linux/dev"?
Comment 28 Tijl Coosemans freebsd_committer freebsd_triage 2017-01-09 20:44:53 UTC
When you run googleearth as root it tries to remove /dev/nvidiactl and then recreate it, but this gets recreated as /compat/linux/dev/nvidiactl.  Then it tries to use the latter which fails probably because it isn't a proper device.  This means it will never work as root.  You should remove /compat/linux/dev/nvidiactl (and anything else in that directory except "shm") and then we'll have to get it working as a regular user.
Comment 29 freebsd 2017-01-09 21:14:39 UTC
You were right about a nvidiactl file in /compat/linux/dev, but it still crashed when running as a regular user. But I can't run ktrace as a regular user:

$ /bin./sh
$ ulimit -s 8192
$ rm ktrace.out 
$ ls ktrace.out
ls: ktrace.out: No such file or directory
$ ktrace -i ls
ktrace: ktrace.out: Operation not permitted
Comment 30 Tijl Coosemans freebsd_committer freebsd_triage 2017-01-09 22:16:54 UTC
(In reply to freebsd from comment #29)
Are you running from a directory where the user has write access?  You can also specify a path with the -f flag like this:

/bin/sh
ulimit -s 8192
ktrace -i -f /tmp/ktrace.out googleearth
kdump -H -f /tmp/ktrace.out > kdump.txt

Another possibility is that you have set certain security related sysctl in /boot/loader.conf or /etc/sysctl.conf that prevent debugging by regular users.
Comment 31 Tijl Coosemans freebsd_committer freebsd_triage 2017-01-13 12:40:06 UTC
I've updated x11/nvidia-driver.  See if that changes anything.
Comment 32 Walter Schwarzenfeld freebsd_triage 2018-01-23 09:11:20 UTC
Any news here?
Comment 33 Tijl Coosemans freebsd_committer freebsd_triage 2018-01-23 09:58:14 UTC
Please reopen if this is still an issue.