|
Bugzilla – Full Text Bug Listing |
| Summary: | libzypp segfaults on ARM while writing to log (was: yast2: ycpc when compiling in ARM environment) | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.2 | Reporter: | Forgotten User 0RO3Kla3Ru <forgotten_0RO3Kla3Ru> |
| Component: | libzypp | Assignee: | E-mail List <zypp-maintainers> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | CC: | forgotten_0RO3Kla3Ru, ma |
| Version: | Factory | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
trace from zypper --help
0001-Create-LogControlImpl-on-demand-instead-of-using-a-s.patch gdb trace for segfault with patch applied to libzypp Attempt to prevent the SEGV. |
||
|
Description
Forgotten User 0RO3Kla3Ru
2009-07-27 00:07:17 UTC
Bug submitted to keep track on progress and find solution. segv in libzypp Well, when loading plugin/libpy2Pkg.so.2. Maybe the plugin was linked against an older libzypp and needs to be recompiled (updated) first. These testbuilds are done in an local obs instance - thus it should be compiled in the right order. -> I'm just providing the dependencies one-by-one, so libzypp is a fresh build. (Are you able to build and run zypper?) The location is indeed somewhat special, as this usually is the very first attempt to write something a logfile. Maybe we refer to some static variable, which is on ARM not yet initialized. I'll review the code... zypper build: yes zypper run : no segfault at same position, see attached log Created attachment 308020 [details]
trace from zypper --help
Created attachment 308127 [details]
0001-Create-LogControlImpl-on-demand-instead-of-using-a-s.patch
Fixed in libzypp-6.11.2. In case you don't want to update to the latest libzypp version, the patch should alpply to 6.10.3 as well. Patch applies and: Wrote: /usr/src/packages/SRPMS/yast2-2.18.21-1.src.rpm Wrote: /usr/src/packages/RPMS/armv5tel/yast2-2.18.21-1.armv5tel.rpm Wrote: /usr/src/packages/RPMS/armv5tel/yast2-devel-doc-2.18.21-1.armv5tel.rpm works ! Thanks for the quick fix. I'll report also for zypper. report for zypper: elrond:/> uname -a Linux elrond 2.6.25.20-0.4-default #1 SMP 2009-06-01 09:57:12 +0200 armv5tel armv5tel armv5tel GNU/Linux elrond:/> zypper lr Keine Repositories bestimmt. Verwenden Sie das Kommando 'zypper addrepo', um ein oder mehrere Repositories hinzuzufügen. elrond:/> zypper ar -r http://download.opensuse.org/repositories/Base:/build:/arm:/cross/crosscompiled/Base:build:arm:cross.repo qemu: uncaught target signal 11 (Segmentation fault) - core dumped Speicherzugriffsfehler Log attached. Should I open a new bugreport ? Created attachment 308179 [details]
gdb trace for segfault with patch applied to libzypp
(In reply to comment #11) > Log attached. Should I open a new bugreport ? No, we can collect those startup issues here. There's another one while running zypper ref:
#0 0x40352740 in putStream (message_r=<value optimized out>,
line_r=<value optimized out>, func_r=<value optimized out>,
level_r=<value optimized out>, this=<value optimized out>,
file_r=<value optimized out>, group_r=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.13.1/zypp/base/LogControl.cc:295
#1 putStream (message_r=<value optimized out>, line_r=<value optimized out>,
func_r=<value optimized out>, level_r=<value optimized out>,
this=<value optimized out>, file_r=<value optimized out>,
group_r=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.13.1/zypp/base/LogControl.cc:376
#2 zypp::base::logger::Loglinebuf::writeout (message_r=<value optimized out>,
line_r=<value optimized out>, func_r=<value optimized out>,
level_r=<value optimized out>, this=<value optimized out>,
file_r=<value optimized out>, group_r=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.13.1/zypp/base/LogControl.cc:155
#3 0x4034f944 in zypp::base::logger::Loglinebuf::overflow
(this=0xbec2f508, ch=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.13.1/zypp/base/LogControl.cc:141
#4 0x40550188 in std::basic_ostream<char, std::char_traits<char>>::put(char)()
from /usr/lib/libstdc++.so.6
#5 0x40550278 in std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::---Type <return> to continue, or q <return> to
quit---
char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&)
()
from /usr/lib/libstdc++.so.6
#6 0x401411c8 in operator<< (this=<value optimized out>, __pf=<value optimized out>)
at /usr/include/c++/4.4/ostream:113
#7 zypp::media::MediaHandler::release (this=<value optimized out>,
__pf=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.13.1/zypp/media/MediaHandler.cc:701
#8 0x4013a3b0 in zypp::media::MediaAccess::close (this=0x169388)
Looks like DGB << "foo bar" is causing this (same for #12).
Created attachment 317614 [details]
Attempt to prevent the SEGV.
In case it helps, it will be present in libzypp-6.14.4
Hi Michael!
Hot news from the openSUSE Conference :
legolas:/etc> zypper in xorg-x11-*
Loading repository data...
Reading installed packages...
[...]
Resolving package dependencies...
The following NEW packages are going to be installed:
xorg-x11-driver-input xorg-x11-fonts xorg-x11-libX11-unstable-devel xorg-x11-libXext-unstable-devel xorg-x11-libxcb-unstable-devel
xorg-x11-proto-unstable-devel xorg-x11-server-extra xorg-x11-server-rdp
8 new packages to install.
Overall download size: 33.6 MiB. After the operation, additional 67.2 MiB will be used.
Continue? [y/n/?] (y):
Retrieving package xorg-x11-fonts-7.4-5.1.noarch (1/8), 24.0 MiB (30.3 MiB unpacked)
Installing: xorg-x11-fonts-7.4-5.1 [done]
Additional rpm output:
Starting SuSEconfig, the SuSE Configuration Tool...
Running module fonts only
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.fonts...
Creating fonts.{scale,dir} files ........
writing /etc/fonts/suse-font-dirs.conf
/etc/fonts/suse-hinting.conf unchanged
/etc/fonts/suse-bitmaps.conf unchanged
Creating cache files for fontconfig ............................
generating java font setup
Warning: cannot find a sans serif Japanese font. Japanese in Java might not work.
Warning: cannot find a serif Japanese font. Japanese in Java might not work.
Warning: cannot find a sans serif simplified Chinese font. Simplified Chinese in Java might not work.
Warning: cannot find a serif simplified Chinese font. Simplified Chinese in Java might not work.
Warning: cannot find a sans serif traditional Chinese font. Traditional Chinese in Java might not work.
Warning: cannot find a serif traditional Chinese font. Traditional Chinese in Java might not work.
Warning: cannot find a sans serif Korean font. Korean in Java might not work.
Warning: cannot find a serif Korean font. Korean in Java might not work.
Finished.
Retrieving package xorg-x11-server-extra-7.4-52.1.armv5tel (2/8), 6.3 MiB (26.5 MiB unpacked)
Installing: xorg-x11-server-extra-7.4-52.1 [done]
Retrieving package xorg-x11-proto-unstable-devel-7.3.99-3.1.armv5tel (3/8), 327.0 KiB (1.8 MiB unpacked)
Installing: xorg-x11-proto-unstable-devel-7.3.99-3.1 [done]
Retrieving package xorg-x11-server-rdp-7.3.99-6.1.armv5tel (4/8), 656.0 KiB (1.6 MiB unpacked)
Installing: xorg-x11-server-rdp-7.3.99-6.1 [done]
Retrieving package xorg-x11-driver-input-7.4-37.1.armv5tel (5/8), 349.0 KiB (996.0 KiB unpacked)
Installing: xorg-x11-driver-input-7.4-37.1 [done]
Retrieving package xorg-x11-libxcb-unstable-devel-7.3.99-2.9.armv5tel (6/8), 262.0 KiB (2.8 MiB unpacked)
Installing: xorg-x11-libxcb-unstable-devel-7.3.99-2.9 [done]
Retrieving package xorg-x11-libX11-unstable-devel-7.3.99-3.1.armv5tel (7/8), 1.7 MiB (3.0 MiB unpacked)
Installing: xorg-x11-libX11-unstable-devel-7.3.99-3.1 [done]
Retrieving package xorg-x11-libXext-unstable-devel-7.3.99-2.8.armv5tel (8/8), 81.0 KiB (154.0 KiB unpacked)
Installing: xorg-x11-libXext-unstable-devel-7.3.99-2.8 [done]
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Segmentation fault
zypper is now able to install packages. The segfault at the end can be backtraced to:
(gdb) bt
#0 0x00000020 in ?? ()
#1 0x423ad684 in putStream (message_r=<value optimized out>, line_r=<value optimized out>, func_r=<value optimized out>,
level_r=<value optimized out>, this=<value optimized out>, file_r=<value optimized out>, group_r=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.14.2/zypp/base/LogControl.cc:295
#2 putStream (message_r=<value optimized out>, line_r=<value optimized out>, func_r=<value optimized out>,
level_r=<value optimized out>, this=<value optimized out>, file_r=<value optimized out>, group_r=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.14.2/zypp/base/LogControl.cc:376
#3 zypp::base::logger::Loglinebuf::writeout (message_r=<value optimized out>, line_r=<value optimized out>,
func_r=<value optimized out>, level_r=<value optimized out>, this=<value optimized out>, file_r=<value optimized out>,
group_r=<value optimized out>) at /usr/src/packages/BUILD/libzypp-6.14.2/zypp/base/LogControl.cc:155
#4 0x423aa8ac in zypp::base::logger::Loglinebuf::overflow (this=0x4006eba0, ch=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.14.2/zypp/base/LogControl.cc:141
#5 0x425aca08 in std::basic_ostream<char, std::char_traits<char> >::put(char) () from /usr/lib/libstdc++.so.6
#6 0x425acaf4 in std::basic_ostream<char, std::char_traits<char> >& std::endl<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&) () from /usr/lib/libstdc++.so.6
#7 0x4219aa4c in operator<< (this=<value optimized out>, __pf=<value optimized out>) at /usr/include/c++/4.4/ostream:113
#8 zypp::media::MediaHandler::release (this=<value optimized out>, __pf=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.14.2/zypp/media/MediaHandler.cc:701
#9 0x42193b7c in zypp::media::MediaAccess::close (this=0x3afc50) at /usr/src/packages/BUILD/libzypp-6.14.2/zypp/media/MediaAccess.cc:224
#10 0x42194918 in zypp::media::MediaAccess::~MediaAccess (this=0x4006eba0, __in_chrg=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.14.2/zypp/media/MediaAccess.cc:59
#11 0x421dcf08 in checked_delete<zypp::media::MediaAccess> (x=<value optimized out>) at //usr/include/boost/checked_delete.hpp:34
#12 boost::detail::sp_counted_impl_p<zypp::media::MediaAccess>::dispose (x=<value optimized out>)
at //usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:78
#13 0x0004d7ac in release (this=<value optimized out>) at //usr/include/boost/smart_ptr/detail/sp_counted_base_spin.hpp:102
#14 boost::detail::shared_count::~shared_count (this=<value optimized out>) at //usr/include/boost/smart_ptr/detail/shared_count.hpp:217
#15 0x421da0c8 in ~shared_ptr (this=<value optimized out>, __in_chrg=<value optimized out>)
at //usr/include/boost/smart_ptr/shared_ptr.hpp:160
#16 ~RW_pointer (this=<value optimized out>, __in_chrg=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.14.2/zypp/base/PtrTypes.h:266
#17 ~ManagedMedia (this=<value optimized out>, __in_chrg=<value optimized out>)
at /usr/src/packages/BUILD/libzypp-6.14.2/zypp/media/MediaManager.cc:54
#18 ~pair (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/c++/4.4/bits/stl_pair.h:68
#19 destroy (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/c++/4.4/ext/new_allocator.h:115
#20 _M_destroy_node (this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/c++/4.4/bits/stl_tree.h:383
#21 std::_Rb_tree<unsigned int, std::pair<const unsigned int, zypp::media::<unnamed>::ManagedMedia>, std::_Select1st<std::pair<const unsigned int, zypp::media::<unnamed>::ManagedMedia> >, std::less<unsigned int>, std::allocator<std::pair<const unsigned int, zypp::media::<unnamed>::ManagedMedia> > >::_M_erase(std::_Rb_tree_node<std::pair<const unsigned int, zypp::media::<unnamed>::ManagedMedia> > *) (
this=<value optimized out>, __in_chrg=<value optimized out>) at /usr/include/c++/4.4/bits/stl_tree.h:972
#22 0x421dd880 in boost::detail::sp_counted_impl_p<zypp::media::MediaManager_Impl>::dispose() () from /usr/lib/libzypp.so.611
#23 0x0004d7ac in release (this=<value optimized out>) at //usr/include/boost/smart_ptr/detail/sp_counted_base_spin.hpp:102
#24 boost::detail::shared_count::~shared_count (this=<value optimized out>) at //usr/include/boost/smart_ptr/detail/shared_count.hpp:217
#25 0x421dd47c in zypp::RW_pointer<zypp::media::MediaManager_Impl, zypp::rw_pointer::Shared<zypp::media::MediaManager_Impl> >::~RW_pointer(---Type <return> to continue, or q <return> to quit---
) () from /usr/lib/libzypp.so.611
#26 0x426fad38 in __cxa_finalize (d=0x424aa980) at cxa_finalize.c:56
#27 0x42156fe8 in __do_global_dtors_aux () from /usr/lib/libzypp.so.611
#28 0x4007f76c in _dl_fini () at dl-fini.c:243
#29 0x426fa954 in __run_exit_handlers (status=0, listp=0x42811454, run_list_atexit=true) at exit.c:78
#30 0x426fa954 in __run_exit_handlers (status=0, listp=0x42811454, run_list_atexit=true) at exit.c:78
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
Is this with or without the patch from comment #15? No more negative feedback, so it seems to work now; otherwise reopen. |