[Bug 932306] New: valgrind reports memory errors during the installation
http://bugzilla.suse.com/show_bug.cgi?id=932306 Bug ID: 932306 Summary: valgrind reports memory errors during the installation Classification: openSUSE Product: openSUSE Factory Version: 201505* Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Installation Assignee: yast2-maintainers@suse.de Reporter: mvidner@suse.com QA Contact: jsrain@suse.com Found By: Development Blocker: --- To debug bug 929806 (boo#929806) I ran the installation with y2base instrumented with valgrind. Some errors were reported. Logs will follow (once I re-run the thing, because I forgot to use startshell=1 and they got lost). -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=932306 --- Comment #1 from Martin Vidner <mvidner@suse.com> --- Invalid read of size 4 at 0x55C60BC: Y2ProgramComponent::sendToExternal(std::string const&) (Y2ProgramComponent.cc:402) by 0x55C67B4: Y2ProgramComponent::sendToExternal(YCPValue const&) (Y2ProgramComponent.cc:386) by 0x55C684C: Y2ProgramComponent::evaluate(YCPValue const&) (Y2ProgramComponent.cc:135) by 0x5057BAE: ScriptingAgent::executeSubagentCommand(char const*, YCPPath const&, YCPValue const&, YCPValue const&) (ScriptingAgent.cc:623) by 0x5058A92: ScriptingAgent::Read(YCPPath const&, YCPValue const&, YCPValue const&) (ScriptingAgent.cc:196) by 0x57E0833: SCRRead3(YCPPath const&, YCPValue const&, YCPValue const&) (SCR.cc:43) by 0x57E0AF4: SCRRead(YCPPath const&) (SCR.cc:55) Address 0x211f53fc is 12 bytes inside a block of size 13 alloc'd at 0x4C29110: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) by 0x71790A9: strdup (strdup.c:42) by 0x55C60B5: Y2ProgramComponent::sendToExternal(std::string const&) (Y2ProgramComponent.cc:399) by 0x55C67B4: Y2ProgramComponent::sendToExternal(YCPValue const&) (Y2ProgramComponent.cc:386) by 0x55C684C: Y2ProgramComponent::evaluate(YCPValue const&) (Y2ProgramComponent.cc:135) by 0x5057BAE: ScriptingAgent::executeSubagentCommand(char const*, YCPPath const&, YCPValue const&, YCPValue const&) (ScriptingAgent.cc:623) by 0x5058A92: ScriptingAgent::Read(YCPPath const&, YCPValue const&, YCPValue const&) (ScriptingAgent.cc:196) by 0x57E0833: SCRRead3(YCPPath const&, YCPValue const&, YCPValue const&) (SCR.cc:43) by 0x57E0AF4: SCRRead(YCPPath const&) (SCR.cc:55) This is strange, I cannot see what is wrong with the code: https://github.com/yast/yast-core/blob/58b154edb1a8a755ca957a1155e2bd3f49243... 397 char *v = NULL; 398 399 if (is_non_y2) v = strdup(value.c_str()); // no brackets 400 else v = strdup(("(" + value + ")").c_str()); 401 402 bool error = (write(to_external[1], v, strlen(v)) < 0); -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=932306 --- Comment #2 from Martin Vidner <mvidner@suse.com> --- Created attachment 635465 --> http://bugzilla.suse.com/attachment.cgi?id=635465&action=edit valgrind log some libstorage things: Conditional jump or move depends on uninitialised value(s) at 0x88FD78B: rb_obj_written (ruby.h:1269) by 0x88FD78B: rb_obj_write (ruby.h:1291) by 0x88FD78B: rb_ary_push (array.c:910) by 0x1B0EEFDC: SWIG_Ruby_AppendOutput (storage_wrap.cxx:1335) by 0x1B114E96: _wrap_createStorageInterfacePid(int, unsigned long*, unsigned long) (storage_wrap.cxx:31474) by 0x8A43EED: vm_call_cfunc_with_frame (vm_insnhelper.c:1382) by 0x8A43EED: vm_call_cfunc (vm_insnhelper.c:1475) Uninitialised value was created by a stack allocation at 0x8A40EE0: call_cfunc_m1 (vm_insnhelper.c:1209) Conditional jump or move depends on uninitialised value(s) at 0x69667F9: std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, bool) const (in /usr/lib64/libstdc++.so.6.0.19) by 0x697294E: std::ostream& std::ostream::_M_insert<bool>(bool) (in /usr/lib64/libstdc++.so.6.0.19) by 0x1B621FB7: operator<< (ostream:175) by 0x1B621FB7: storage::operator<<(std::ostream&, storage::FsCapabilities const&) (StorageTypes.cc:176) by 0x1B5B80A9: storage::Volume::changeMountBy(storage::MountByType) (Volume.cc:740) by 0x1B52BC03: storage::Storage::changeMountBy(std::string const&, storage::MountByType) (Storage.cc:2637) by 0x1B1072C0: _wrap_StorageInterface_changeMountBy(int, unsigned long*, unsigned long) (storage_wrap.cxx:25305) by 0x8A43EED: vm_call_cfunc_with_frame (vm_insnhelper.c:1382) Uninitialised value was created by a stack allocation at 0x1B50AB70: ??? (in /usr/lib64/libstorage.so.6.0.0) For the second one, apparently Volume::changeMountBy will log the value of an uninitialized `caps` if `getFsCapabilities` fails. (Actually it seems the logging is disabled, but the string is constructed anyway.) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=932306 Martin Vidner <mvidner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aschnell@suse.com, | |shundhammer@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=932306 Martin Vidner <mvidner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |CONFIRMED -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=932306 --- Comment #3 from Arvin Schnell <aschnell@suse.com> --- I have fixed the access to the uninitialized `caps` in Volume::changeMountBy. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=932306 Arvin Schnell <aschnell@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|yast2-maintainers@suse.de |mvidner@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=932306 http://bugzilla.suse.com/show_bug.cgi?id=932306#c4 Martin Vidner <mvidner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|valgrind reports memory |[yast2-core] valgrind |errors during the |reports memory errors |installation |during the installation --- Comment #4 from Martin Vidner <mvidner@suse.com> --- I should rerun the test since GCC5 got merged in the meantime, which may have changed the situation. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=932306 http://bugzilla.suse.com/show_bug.cgi?id=932306#c5 Josef Reidinger <jreidinger@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|CONFIRMED |RESOLVED CC| |jreidinger@suse.com Resolution|--- |FIXED --- Comment #5 from Josef Reidinger <jreidinger@suse.com> --- Not touched for long time and no-one complain. So lets close it as to low priority. Marked as fixed as Arvin do some fixes. -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com