Re: did SVN r227753 (locale changes) break something?

2011-11-22 Thread David Chisnall
On 22 Nov 2011, at 00:21, Michael Butler wrote:

 #0  0x283eb243 in fprintf () from /lib/libc.so.7

This looks suspicious.  uselocale() does not call fprintf().  In fact, nothing 
in xlocale.c does - fprintf() accesses the current locale, so calling it from 
anywhere in the setlocale() path is likely to be problematic.

 #1  0x283eb558 in uselocale () from /lib/libc.so.7
 #2  0x283eb6f9 in newlocale () from /lib/libc.so.7
 #3  0x281637f2 in msg_Subscribe () from /usr/local/lib/libvlccore.so.4

The newlocale / uselocale functions were introduced with the xlocale commit, so 
no existing code should be using them.  If you're just reconfigured / 
recompiled libvlccore.so then we may be in an untested code path - I'd have to 
see what the parameter to newlocale() was to be able to debug this.

David___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: did SVN r227753 (locale changes) break something?

2011-11-22 Thread David Chisnall
It's entirely possible - please can you compile libc with debug symbols?  The 
back trace isn't very informative...

David

On 22 Nov 2011, at 00:21, Michael Butler wrote:

 VLC (multimedia/vlc) on my -current now crashes leaving a trace like this ..
 
 imb@toshi:/home/imb gdb `which vlc` vlc.core
 GNU gdb 6.1.1 [FreeBSD]
 Copyright 2004 Free Software Foundation, Inc.
 GDB is free software, covered by the GNU General Public License, and you are
 welcome to change it and/or distribute copies of it under certain conditions.
 Type show copying to see the conditions.
 There is absolutely no warranty for GDB.  Type show warranty for details.
 This GDB was configured as i386-marcel-freebsd...(no debugging symbols 
 found)...
 Core was generated by `vlc'.
 Program terminated with signal 11, Segmentation fault.
 Reading symbols from /usr/local/lib/libvlc.so.7...(no debugging symbols 
 found)...done.
 Loaded symbols for /usr/local/lib/libvlc.so.7
 Reading symbols from /usr/local/lib/libvlccore.so.4...(no debugging symbols 
 found)...done.
 Loaded symbols for /usr/local/lib/libvlccore.so.4
 Reading symbols from /usr/local/lib/libdbus-1.so.3...(no debugging symbols 
 found)...done.
 Loaded symbols for /usr/local/lib/libdbus-1.so.3
 Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
 Loaded symbols for /lib/libm.so.5
 Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging symbols 
 found)...done.
 Loaded symbols for /usr/local/lib/libiconv.so.3
 Reading symbols from /lib/libthr.so.3...(no debugging symbols found)...done.
 Loaded symbols for /lib/libthr.so.3
 Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
 Loaded symbols for /lib/libc.so.7
 Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols 
 found)...done.
 Loaded symbols for /libexec/ld-elf.so.1
 #0  0x283eb243 in fprintf () from /lib/libc.so.7
 [New Thread 28804300 (LWP 100408/vlc)]
 (gdb) bt
 #0  0x283eb243 in fprintf () from /lib/libc.so.7
 #1  0x283eb558 in uselocale () from /lib/libc.so.7
 #2  0x283eb6f9 in newlocale () from /lib/libc.so.7
 #3  0x281637f2 in msg_Subscribe () from /usr/local/lib/libvlccore.so.4
 #4  0x in ?? ()
 #5  0x28191f6f in .rodata () from /usr/local/lib/libvlccore.so.4
 #6  0x28420120 in _CurrentRuneLocale () from /lib/libc.so.7
 #7  0x in ?? ()
 #8  0x281a3ee0 in .got () from /usr/local/lib/libvlccore.so.4
 #9  0x288400fc in ?? ()
 #10 0x288400fc in ?? ()
 #11 0x280ca9b6 in libvlc_InternalCreate () from /usr/local/lib/libvlccore.so.4
 #12 0x281a4df4 in .bss () from /usr/local/lib/libvlccore.so.4
 #13 0x005c in ?? ()
 #14 0xfd66 in ?? ()
 #15 0x281861d4 in .rodata () from /usr/local/lib/libvlccore.so.4
 #16 0x0440 in ?? ()
 #17 0x0001 in ?? ()
 #18 0x in ?? ()
 #19 0x280b4ad0 in .got () from /usr/local/lib/libvlc.so.7
 #20 0xbfbfe640 in ?? ()
 #21 0x0002 in ?? ()
 #22 0xbfbfe678 in ?? ()
 #23 0x280a39b2 in libvlc_new () from /usr/local/lib/libvlc.so.7
 Previous frame inner to this frame (corrupt stack?)
 (gdb)
 ___
 freebsd-current@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-current
 To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: did SVN r227753 (locale changes) break something?

2011-11-22 Thread Michael Butler

On 11/22/11 08:37, David Chisnall wrote:

Do you have valgrind installed?  It would probably also be helpful to see the 
results from that.


With symbols for libc ..

#0  xlocale_retain (val=0x0) at atomic.h:363
363 ATOMIC_ASM(add,  long,  addl %1,%0,  ir,  v);
[New Thread 28804300 (LWP 100592/vlc)]
(gdb) bt
#0  xlocale_retain (val=0x0) at atomic.h:363
#1  0x283eb568 in dupcomponent (type=3, base=Variable base is not 
available.

) at /usr/home/imb/svn/head/lib/libc/locale/xlocale.c:204
#2  0x283eb709 in newlocale (mask=Variable mask is not available.
) at /usr/home/imb/svn/head/lib/libc/locale/xlocale.c:250
#3  0x281637f2 in msg_Subscribe () from /usr/local/lib/libvlccore.so.4
#4  0x in ?? ()
#5  0x28191f6f in .rodata () from /usr/local/lib/libvlccore.so.4
#6  0x28420120 in __xlocale_global_locale () from /lib/libc.so.7
#7  0x in ?? ()
#8  0x281a3ee0 in .got () from /usr/local/lib/libvlccore.so.4
#9  0x288400fc in ?? ()
#10 0x288400fc in ?? ()
#11 0x280ca9b6 in libvlc_InternalCreate () from 
/usr/local/lib/libvlccore.so.4

#12 0x281a4df4 in .bss () from /usr/local/lib/libvlccore.so.4
#13 0x005c in ?? ()
#14 0xfd66 in ?? ()
#15 0x281861d4 in .rodata () from /usr/local/lib/libvlccore.so.4
#16 0x0440 in ?? ()
#17 0x0001 in ?? ()
#18 0x in ?? ()
#19 0x280b4ad0 in .got () from /usr/local/lib/libvlc.so.7
#20 0xbfbfe640 in ?? ()
#21 0x0002 in ?? ()
#22 0xbfbfe678 in ?? ()
#23 0x280a39b2 in libvlc_new () from /usr/local/lib/libvlc.so.7
Previous frame inner to this frame (corrupt stack?)

 .. and valgrind shows ..

imb@toshi:/home/imb valgrind vlc
==41007== Memcheck, a memory error detector
==41007== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==41007== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==41007== Command: vlc
==41007==
VLC media player 1.1.12 The Luggage (revision exported)
==41007== Invalid read of size 4
==41007==at 0x3BC253: ??? (atomic.h:363)
==41007==by 0x3BC567: ??? (xlocale.c:204)
==41007==by 0x3BC708: newlocale (xlocale.c:250)
==41007==by 0x1347F1: msg_Create (in /usr/local/lib/libvlccore.so.4)
==41007==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==41007==
==41007==
==41007== Process terminating with default action of signal 11 
(SIGSEGV): dumping core

==41007==  Access not within mapped region at address 0x0
==41007==at 0x3BC253: ??? (atomic.h:363)
==41007==by 0x3BC567: ??? (xlocale.c:204)
==41007==by 0x3BC708: newlocale (xlocale.c:250)
==41007==by 0x1347F1: msg_Create (in /usr/local/lib/libvlccore.so.4)
==41007==  If you believe this happened as a result of a stack
==41007==  overflow in your program's main thread (unlikely but
==41007==  possible), you can try to increase the size of the
==41007==  main thread stack using the --main-stacksize= flag.
==41007==  The main thread stack size used in this run was 16777216.
==41007==
==41007== HEAP SUMMARY:
==41007== in use at exit: 9,284 bytes in 76 blocks
==41007==   total heap usage: 79 allocs, 3 frees, 9,316 bytes allocated
==41007==
==41007== LEAK SUMMARY:
==41007==definitely lost: 0 bytes in 0 blocks
==41007==indirectly lost: 0 bytes in 0 blocks
==41007==  possibly lost: 554 bytes in 13 blocks
==41007==still reachable: 8,730 bytes in 63 blocks
==41007== suppressed: 0 bytes in 0 blocks
==41007== Rerun with --leak-check=full to see details of leaked memory
==41007==
==41007== For counts of detected and suppressed errors, rerun with: -v
==41007== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
Segmentation fault

 .. so it looks like a NULL pointer but I guess I need to recompile 
libvlc to see if it's involved,


imb

___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: did SVN r227753 (locale changes) break something?

2011-11-22 Thread David Chisnall

On 22 Nov 2011, at 14:00, Michael Butler wrote:

 On 11/22/11 08:52, David Chisnall wrote:
 Please can you try this patch?
...
 That works :-)
 
 Thanks!

Fixed in head (r227818), thanks for the report!

David
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org


Re: did SVN r227753 (locale changes) break something?

2011-11-21 Thread Andrey Chernov
On Mon, Nov 21, 2011 at 07:21:17PM -0500, Michael Butler wrote:
 #0  0x283eb243 in fprintf () from /lib/libc.so.7
 #1  0x283eb558 in uselocale () from /lib/libc.so.7
 #2  0x283eb6f9 in newlocale () from /lib/libc.so.7
 #3  0x281637f2 in msg_Subscribe () from /usr/local/lib/libvlccore.so.4

Could you contact new locale submitter directly on this issue, please?
It seems I don't understand the new code path well.

-- 
http://ache.vniz.net/
___
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to freebsd-current-unsubscr...@freebsd.org