Bug 304793

Summary: Segmentation fault when registering empty plaindir repository
Product: [openSUSE] openSUSE 10.3 Reporter: Francis Giannaros <francis>
Component: libzyppAssignee: Michael Andres <ma>
Status: RESOLVED DUPLICATE QA Contact: Adrian Schröter <adrian.schroeter>
Severity: Major    
Priority: P5 - None CC: lslezak
Version: Beta 2   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast log

Description Francis Giannaros 2007-08-27 10:55:35 UTC
If you add a directory that doesn't exist as a repository then it segfaults (doesn't happen with yast2 inst_source, but does with kiwi):

desktop:/home/francis # yast2 kiwi
YaST got signal 11 at YCP file product-creator/kiwi_dialogs.ycp:1595
/sbin/yast2: line 385: 21949 Segmentation fault      $ybindir/y2base $module "$@" "$SELECTED_GUI" $Y2_GEOMETRY $Y2QT_ARGS

YaST logs: http://francis.giannaros.org/files/y2logs-2.tgz
Comment 1 Jiří Suchomel 2007-08-27 16:14:16 UTC
How were you able to enter such directory? For me, broken repository is not added. At what time did it fall - just after you've added it?

Are you able to reproduce it?
Comment 2 Francis Giannaros 2007-08-27 19:39:27 UTC
I can reproduce this every time. Here's exactly what I do:

(i) yast2 kiwi
(ii) Add repository -> Local Directory
(iii) Specify a folder that exists but is empty, <next>
(iv) looks like it's loading for a second, but then segfault

Hope that helps.
Comment 3 Jiří Suchomel 2007-08-28 05:55:27 UTC
Ladislav, is that a known problem?
It crashes in SourceCreateType, resp. SourceCreate (for both local directory and plaindir types).
Comment 4 Ladislav Slezák 2007-08-28 06:45:22 UTC
I'm not sure whether it's known but there are many bugs in plaindir handling, it might be a duplicate. I can reproduce it in 10.3-Beta2.
Comment 5 Ladislav Slezák 2007-08-28 06:47:35 UTC
Created attachment 160166 [details]
yast log

Note: When probing for dir:// repository fails yast tries to register it using plaindir type.
Comment 6 Ladislav Slezák 2007-08-28 06:49:59 UTC
Here is the backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb7598ae0 (LWP 8948)]
0xb77926ef in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () from /usr/lib/libstdc++.so.6
(gdb) bt
#0  0xb77926ef in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string () from /usr/lib/libstdc++.so.6
#1  0xb6f597c1 in zypp::RWCOW_pointer<zypp::ProgressData::Data, zypp::rw_pointer::Shared<zypp::ProgressData::Data> >::assertUnshared ()
   from /usr/lib/libzypp.so.313.5.2
#2  0xb7252ea4 in zypp::CombinedProgressData::operator() ()
   from /usr/lib/libzypp.so.313.5.2
#3  0xb6f88824 in boost::detail::function::function_obj_invoker1<zypp::CombinedProgressData, bool, zypp::ProgressData const&>::invoke ()
   from /usr/lib/libzypp.so.313.5.2
#4  0xb7253087 in boost::function1<bool, zypp::ProgressData const&, std::allocator<void> >::operator() () from /usr/lib/libzypp.so.313.5.2
#5  0xb72524ce in zypp::ProgressData::report ()
   from /usr/lib/libzypp.so.313.5.2
#6  0xb708ad9f in zypp::repo::cached::RepoImpl::~RepoImpl ()
   from /usr/lib/libzypp.so.313.5.2
#7  0xb706b3e0 in zypp::repo::intrusive_ptr_release ()
   from /usr/lib/libzypp.so.313.5.2
#8  0xb5df9083 in boost::intrusive_ptr<zypp::repo::RepositoryImpl>::~intrusive_ptr () from /usr/lib/YaST2/plugin/libpy2Pkg.so.2
#9  0xb5df90ad in zypp::RW_pointer<zypp::repo::RepositoryImpl, zypp::rw_pointer::Intrusive<zypp::repo::RepositoryImpl> >::~RW_pointer ()
   from /usr/lib/YaST2/plugin/libpy2Pkg.so.2
#10 0xb5df90e5 in zypp::Repository::~Repository ()
   from /usr/lib/YaST2/plugin/libpy2Pkg.so.2
#11 0xb5e2137e in PkgModuleFunctions::LoadResolvablesFrom ()
   from /usr/lib/YaST2/plugin/libpy2Pkg.so.2
#12 0xb5e25ee1 in PkgModuleFunctions::SourceCreateEx ()
   from /usr/lib/YaST2/plugin/libpy2Pkg.so.2
#13 0xb5e26e8f in PkgModuleFunctions::SourceCreate ()
   from /usr/lib/YaST2/plugin/libpy2Pkg.so.2
#14 0xb5dd39af in Y2PkgFunction::evaluateCall ()
   from /usr/lib/YaST2/plugin/libpy2Pkg.so.2


It crashes in RepoImpl destructor.
Comment 7 Stanislav Visnovsky 2007-08-29 10:34:33 UTC
Worsk 

*** This bug has been marked as a duplicate of bug 299680 ***