DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD General

NetBSD General Other questions regarding NetBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 16th February 2017
cag cag is offline
Real Name: Cág
Warrior from pkgsrc
 
Join Date: Feb 2017
Posts: 4
Question Segfaults in multiple programmes

Hi everyone,

I finally registered, have been reading the forum for years.

I'll simply copy this from LQ. Already have written to a couple of lists (including netbsd-users) but without results.

Running 7.0.2 with out of the box kernel. All my GTK+2 apps segfault on keyboard input. lxappearance for example, when looking for a theme you can start pressing keys and it will search. But in my case it dumps core with /usr/lib/libpthread.so.1, /usr/lib/libc.so.12 and /usr/pkg/lib/libXcursor.so.1. The same thing happens when typing something into a GTK+2 text editor, leafpad, or looking for something in Ctrl+O window in firefox or gimp or any other programme. gimp can't even run inside gdb because of:
Code:
Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007f7fea49f6aa in ___lwp_park60 () from /usr/lib/libc.so.12
(gdb) bt
#0  0x00007f7fea49f6aa in ___lwp_park60 () from /usr/lib/libc.so.12
#1  0x00007f7fec808f2b in pthread_cond_timedwait () from /usr/lib/libpthread.so.1
#2  0x00007f7feb880b80 in g_cond_wait () from /usr/pkg/lib/libglib-2.0.so.0
#3  0x00007f7feb81d7cd in g_async_queue_pop_intern_unlocked () from /usr/pkg/lib/libglib-2.0.so.0
#4  0x00007f7feb86742f in g_thread_pool_thread_proxy () from /usr/pkg/lib/libglib-2.0.so.0
#5  0x00007f7feb866a7d in g_thread_proxy () from /usr/pkg/lib/libglib-2.0.so.0
#6  0x00007f7fec80a9cc in ?? () from /usr/lib/libpthread.so.1
#7  0x00007f7fea483de0 in ?? () from /usr/lib/libc.so.12
#8  0x0000000000000000 in ?? ()
Firefox also has problems in libc.so.12 and libpthread.so.1 but doesn't say about __lwp_park60. It also can't run inside gdb.

lxappearance also dumps core when clicking Apply after changing something (themes, cursor or icon themes, fonts etc.) with another output:
Code:
#0  0x00007f7fefcb27ba in ?? () from /usr/lib/libc.so.12
#1  0x00007f7fefcb2bc7 in malloc () from /usr/lib/libc.so.12
#2  0x00007f7ff1849782 in g_malloc () from /usr/pkg/lib/libglib-2.0.so.0
#3  0x00007f7ff185ef1c in g_memdup () from /usr/pkg/lib/libglib-2.0.so.0
#4  0x00007f7ff18356b8 in g_hash_table_insert_node () from /usr/pkg/lib/libglib-2.0.so.0
#5  0x00007f7ff1835823 in g_hash_table_insert_internal () from /usr/pkg/lib/libglib-2.0.so.0
#6  0x00007f7ff183ccb1 in g_key_file_flush_parse_buffer () from /usr/pkg/lib/libglib-2.0.so.0
#7  0x00007f7ff183cf62 in g_key_file_parse_data () from /usr/pkg/lib/libglib-2.0.so.0
#8  0x00007f7ff183d0e1 in g_key_file_load_from_fd () from /usr/pkg/lib/libglib-2.0.so.0
#9  0x00007f7ff183d99e in g_key_file_load_from_file () from /usr/pkg/lib/libglib-2.0.so.0
#10 0x0000000000405532 in _start ()
Apart from these programmes I receive SIGILL in mplayer when trying to play videos. Backtrace doesn't tell anything useful.

sxiv, an image viewer, segfaults with this:
Code:
#0  0x00007f7ff64b209f in ?? () from /usr/lib/libc.so.12
#1  0x00007f7ff64b3983 in free () from /usr/lib/libc.so.12
#2  0x000000000040729c in remove_file ()
#3  0x0000000000409a92 in main ()
Previously, if built from local pkgsrc tree it worked but now stopped working at all at all.

mpg321 dumps core and says "Memory fault" with this backtrace:
Code:
#0  0x00007f7ff78068b1 in sem_post () from /usr/lib/libpthread.so.1
#1  0x000000000040afe0 in ?? ()
#2  0x0000000000403695 in ?? ()
#3  0x00007f7ff7ffa000 in ?? ()
#4  0x0000000000000002 in ?? ()
#5  0x00007f7ffffffdb0 in ?? ()
#6  0x00007f7ffffffdb7 in ?? ()
#7  0x0000000000000000 in ?? ()
I did memtests, once for four hours (two passes) and once for eight hours (eight passes). I did Dell's ePSA tests (diagnostic utility accessed from BIOS), it has own memtest, apart from monitoring the hard drive, the power supply, the keyboard, the fans, the CPU; all of them returned no errors. I rebuilt gtk2 with debug symbols but it changed nothing. On LQ it was suggested that I have hardware problems, but I am not convinced. Every programme described above worked inside Ubuntu LiveUSB
and Void Linux LiveUSB on the same machine (picked because they have different libc's). Before I had NetBSD with X11 a couple of months ago (and earlier) and I didn't have these errors. In the Interwebs
I found similar messages on Arch forum and Launchpad. Is there a need for a 24 hour memtest? Should I just remove each of the two memory modules and try? Is it hardware related after all?

Thanks everyone for any kind of help.
Reply With Quote
  #2   (View Single Post)  
Old 16th February 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,670
Default

SIGILL? That's an "illegal instruction" error, which would be reported by your CPU. Could you please post your dmesg? That might help.
Reply With Quote
  #3   (View Single Post)  
Old 16th February 2017
cag cag is offline
Real Name: Cág
Warrior from pkgsrc
 
Join Date: Feb 2017
Posts: 4
Default

Quote:
Originally Posted by jggimi View Post
SIGILL? That's an "illegal instruction" error, which would be reported by your CPU.
I was wondering that too, assuming mplayer is built locally from pkgsrc.

Quote:
Could you please post your dmesg? That might help.
Attached.

Could this be a broken installation?
Attached Files
File Type: txt dmesg.txt (15.5 KB, 24 views)
Reply With Quote
  #4   (View Single Post)  
Old 16th February 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,670
Default

Quote:
Originally Posted by cag View Post
Could this be a broken installation?
I don't know, I don't speak NetBSD. But "segfaults everywhere" always smell like hardware if they are not repeatable. Repeatable segfaults are more likely to be software. If these are repeatable, then yes, a broken, misconfigured system is possible. On my BSD variant, we talk a lot about "Frankensystems" where people mix bits and pieces of different releases, different flavors, which can lead either to problems or to unmaintainability, or both.

To the best of my recollection, I've only seen "real" SIGILL signals on i386 variants that have limited capabilities. It's primarily why I asked for a dmesg -- thought it may be helpful to NetBSD users who reply to this thread. You're running an amd64 system on an Ivy Bridge CPU, which may be helpful for them to know.

Any other SIGILLs I can remember seeing have been seen on a branch to a bad instruction address. Those go hand-in-hand with SIGSEGVs, as one is a branch, the other a reference.
Reply With Quote
  #5   (View Single Post)  
Old 16th February 2017
cag cag is offline
Real Name: Cág
Warrior from pkgsrc
 
Join Date: Feb 2017
Posts: 4
Default

Quote:
Originally Posted by jggimi View Post
I don't know, I don't speak NetBSD. But "segfaults everywhere" always smell like hardware if they are not repeatable. Repeatable segfaults are more likely to be software. If these are repeatable, then yes, a broken, misconfigured system is possible.
The thing is, I had something similar on Alpine Linux previously, all these things started to segfault at one point for some reason. I didn't debug them back then (it was in December on the same machine), so I didn't know what was the reason.
Quote:
On my BSD variant, we talk a lot about "Frankensystems" where people mix bits and pieces of different releases, different flavors, which can lead either to problems or to unmaintainability, or both.
Here we can have something similar, I once used current pkgsrc tree on a stable release system and it wasn't good. I no longer do this.

Quote:
To the best of my recollection, I've only seen "real" SIGILL signals on i386 variants that have limited capabilities. It's primarily why I asked for a dmesg -- thought it may be helpful to NetBSD users who reply to this thread. You're running an amd64 system on an Ivy Bridge CPU, which may be helpful for them to know.

Any other SIGILLs I can remember seeing have been seen on a branch to a bad instruction address. Those go hand-in-hand with SIGSEGVs, as one is a branch, the other a reference.
If running inside gdb mplayer reports SIGSEGV, if alone then SIGILL.
Reply With Quote
  #6   (View Single Post)  
Old 16th February 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 5,670
Default

Quote:
Originally Posted by cag View Post
If running inside gdb mplayer reports SIGSEGV, if alone then SIGILL.
If each failure is at the same spot, then I'd think software. If every time they failed at different points, then I'd think hardware.

Last edited by jggimi; 16th February 2017 at 03:52 PM. Reason: clarity. I have too much blood in my caffeine system.
Reply With Quote
  #7   (View Single Post)  
Old 16th February 2017
schnoebe schnoebe is offline
Real Name: Eric Schnoebelen
old timer
 
Join Date: Feb 2016
Location: Plano, TX, US
Posts: 31
Default

Have you run memory diagnostics on the system? Afer all, you've mentioned having similar problems with both NetBSD and Linux.

A bad bit, or even bank, of memory can appear in all sorts of fashions.
Reply With Quote
  #8   (View Single Post)  
Old 17th February 2017
cynwulf cynwulf is offline
Package Pilot
 
Join Date: Mar 2014
Posts: 179
Default

Your dmesg shows some errors possibly relating to the video BIOS and an ACPI error.

And also
Code:
WARNING: 16 errors while detecting hardware; check system log.
You should probably check and research into these first.
Reply With Quote
  #9   (View Single Post)  
Old 1st March 2017
cag cag is offline
Real Name: Cág
Warrior from pkgsrc
 
Join Date: Feb 2017
Posts: 4
Default

Posting here as well for future generations.

mpg321 is the only thing that segfaults now. GTK+2, mplayer and sxiv errors regarding libXcursor.so were caused by a cursor theme. sxiv doesn't abort if built with gmake.

Thanks everyone.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculix Package/Port segfaults alexir FreeBSD Ports and Packages 3 24th January 2017 07:10 AM
[SOLVED] opera crash/crashes segfaults FIX maybe useful jb_daefo FreeBSD Ports and Packages 0 25th December 2015 02:34 PM
xombrero segfaults on OpenBSD -current macppc daemonfowl OpenBSD Packages and Ports 12 30th October 2013 10:19 PM
Xorg 1.6.5 on OBSD 4.7 segfaults. :( Lilith OpenBSD General 13 7th August 2010 03:09 AM
Multiple VPN rondynames OpenBSD General 5 24th July 2008 11:51 AM


All times are GMT. The time now is 07:01 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick