FS#15466 - [muse] total crash due to Glibc update

Attached to Project: Arch Linux
Opened by David Bluecame (david.bluecame) - Thursday, 09 July 2009, 20:06 GMT
Last edited by Eric Belanger (Snowman) - Saturday, 03 October 2009, 01:13 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Eric Belanger (Snowman)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

In my arch linux x86_64, after the last system upgrade (including testing packages), muse 0.9-3 didn't start due to the following message:

"muse: malloc.c:3074: sYSMALLOc: Assertion `(old_top == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed.
Abortado"

I have tried to install the newest version (1.0rc3) compiling it directly from the source code in the official muse page and after installing it, the same crash happened.

** PROVISIONAL SOLUTION **: downgrade glibc to the previous version: glibc 2.9-7
Muse works fine with that version of glibc, but I understand it can't be a permanent solution, as newer applications might depend on glib 2.10.



Additional info:
* package version(s)
Linux SOBREMESA 2.6.30-ARCH #1 SMP PREEMPT Fri Jun 19 20:44:03 UTC 2009 x86_64 AMD Sempron(tm) Processor 3000+ AuthenticAMD GNU/Linux

Locale: es_ES@utf8

muse 0.9-3 (I have tried also the 1.0rc3 from the muse official web)
glibc 2.10.1-2


* config and/or log files etc.
not neccessary


Steps to reproduce:

Install muse 0.9-3 or compile the newest 1.0rc3 from the official web, and upgrade the system, including glibc to 2.10.1-2. Execute muse and you will have the crash.

Best regards.

David Bluecame.
This task depends upon

Closed by  Eric Belanger (Snowman)
Saturday, 03 October 2009, 01:13 GMT
Reason for closing:  Fixed
Additional comments about closing:  muse-1.0rc3-1 is now in extra
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 09 July 2009, 20:30 GMT
  • Field changed: Attached to Project (Community Packages → Arch Linux)
  • Field changed: Summary (Muse total crash due to Glibc update → [muse] total crash due to Glibc update)
  • Field changed: Architecture (x86_64 → All)
  • Field changed: Severity (Critical → High)
This is a upstream bug in muse. This type of error can be skiped with a workaround, running the program with:

MALLOC_CHECK_=0 muse
Comment by David Bluecame (david.bluecame) - Thursday, 09 July 2009, 20:38 GMT
Hello Mr.Exequiel.

I have upgraded again Glibc to 2.10 and tried your workaround. I works, but not with "MALLOC_CHECK_=0 muse". I tried "MALLOC_CHECK_=false muse" instead and it worked all right! Thank you a lot for your super-fast answer!

I initially placed the "critical" instead of "high" because this was a bug that "smelled bad" to me, as it seemed a big problem for muse and a potential problem for other applications that may fail because of the same modifications in the new glibc code. I'm glad that this workaround is enough to solve the problem.

Thank you again and best regards.

David Bluecame.
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 09 July 2009, 21:41 GMT
Passing false, is like passing 'f' , that is like passing 6 or 2 (that is supposed to check)... Anyways numbers above 3 are undocumented.

Anyway is rare that 0 always trigger the check, is supose to disable the checks.

Por nada ;)

En fin...
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 09 July 2009, 22:38 GMT
  • Field changed: Architecture (All → x86_64)
OK doing some debugs... here is the patch (for 1.0rc3). Maybe I am wrong, but the crash is solved. The crash is only under x86_64.

Just only reserve more memory, seems that in some part of the code, overwrite memory that is not reserved...

Reporting to upstream ;)
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 09 July 2009, 23:11 GMT
https://sourceforge.net/tracker/?func=detail&aid=2819312&group_id=93414&atid=604222 [1.0rc3 malloc problem w/glibc-2.10 on x86_64 (with fix)]
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 14 July 2009, 04:08 GMT
David, at this moment there are no responses from upstream, need to wait more time.
I don't use this program, can you apply the patch, and test if there any issues? At least the startup/stop application is solved with it.
So if confirmed to work properly can assing this task to some dev (because this pkg is orphaned) and can apply the patch.

Thanks.
Comment by David Bluecame (david.bluecame) - Tuesday, 14 July 2009, 16:54 GMT
Dear Gerardo.

I have downloaded again the 1.0rc3 version from muse-sequencer.org (just in case). I have tested *without* your patch in both my i686 and my x86_64 systems:
* i686 - works fine
* x86_64 - alloc error

After applying your patch, muse 1.0rc3 works fine in both i686 and x86_64 systems!. I have performed the basic operations in muse, but it appears to be fine.

By the way, I have an special interest in Muse sequencer, as I use it for MIDI recording, arranging and composition. I this package is "orphaned", can I do anything to help with it's maintenance? I only know the very basics of compiling and PKGBUILD, etc, and I would never have been able to track the alloc bug nor make a patch as you did, but maybe I can help a little.

Thank you and best regards.

David Bluecame.
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 16 July 2009, 03:47 GMT
Hi David.

There are an upstream response for the patch: "Right, the fix is probably not optimal. I'm going to add it with clear comments as to it's origins.". I suspect that will be be fixed better in 1.0rc4 ;)
For now: user of this package have two options: running with the MALLOC_CHECK_ var or patching the rc3 version.

For the help: normally a "random dev" updated the packages when are orphaned, if no one are interested, the pkg is moved to [community] then a Trusted User adopt it.
My opinion is: reporting the bug, testing, proposing a pkgbuild and posting here or in the mailing list is the best way to contribute ;)

You are welcome.


Assigning to the latest packager for the last decision of this:
1) Keep the 0.9 version like now.
2) Rebuild the 0.9+proposed patch (probably requires more patches for new toolchain)
3) Rebuild the 1.0rc3+proposed patch (does not need any patch for gcc)
4) Wait for 1.0rc4 (if fixes this)
5) Wait for 1.0 final.

I like the option (3).
Comment by Gerardo Exequiel Pozzi (djgera) - Saturday, 15 August 2009, 00:13 GMT
The patch was finally acepted by upstream [#1] so next rc4 or final will include it ;)

[#1] http://lmuse.cvs.sourceforge.net/viewvc/lmuse/muse/muse/memory.cpp?r1=1.1.1.1&r2=1.1.1.1.2.1&pathrev=REL07
Comment by Roman Kyrylych (Romashka) - Wednesday, 16 September 2009, 07:56 GMT
can this be closed then?
Comment by Gerardo Exequiel Pozzi (djgera) - Thursday, 17 September 2009, 01:36 GMT
Maybe, but need the patch to work propertly. Is orphaned, and seems that there are no developer interested on it.
I guess that is better this package to [community]. And some TU can adopt it.
Comment by Gerardo Exequiel Pozzi (djgera) - Tuesday, 22 September 2009, 23:03 GMT
@Eric: I add this task for you because, acording to DeveloperWiki:Internal Projects [#1], you are listed as "Orphan Team" [#2].

As I said before, this package should be moved to [community] if nobody rebuild it. ;)

[#1] http://wiki.archlinux.org/index.php/DeveloperWiki:Internal_Projects
[#2] http://wiki.archlinux.org/index.php/DeveloperWiki:Internal_Projects#Orphan_Team
Comment by Eric Belanger (Snowman) - Tuesday, 22 September 2009, 23:29 GMT
I'll apply the patch then.

@Gerardo: About the "Orphan Team", I am more willing to do trivial upstream updates then getting assigned the bugs for orphan packages. Unless I screw up when I updated the package, of course.
Comment by Eric Belanger (Snowman) - Wednesday, 23 September 2009, 03:57 GMT
it doesn't build:

g++ -g -fno-exceptions -Wall -W -D_GNU_SOURCE -D_REENTRANT -DQT_CLEAN_NAMESPACE -DQT_NO_COMPAT -I.. -I../muse/widgets -I/opt/qt/include -O3 -fomit-frame-poin
ter -ffast-math -fstrength-reduce -funroll-loops -I.. -I../synti -I../muse/widgets -DQT_SHARED -DQT_THREAD_SUPPORT -DQT_PLUGIN -march=x86-64 -mtune=generic -
pipe -Wl,--hash-style=gnu -Wl,--as-needed -o muse -fno_exceptions ticksynth.o vst.o synth.o plugin.o mtc.o thread.o audio.o audioprefetch.o globals.o sync.o
midiport.o part.o tempo.o pos.o sig.o key.o undo.o songfile.o midi.o importmidi.o exportmidi.o midifile.o xml.o icons.o event.o eventlist.o midievent.o wavee
vent.o mpevent.o track.o audiotrack.o wavetrack.o wave.o seqmsg.o app.o song.o transport.o conf.o confmport.o help.o midieditor.o cobject.o value.o midictrl.
o transpose.o miditransform.o appearance.o node.o midiseq.o helper.o memory.o mididev.o route.o shortcuts.o ctrl.o gconfig.o moc_plugin.o moc_app.o moc_song.
o moc_transport.o moc_conf.o moc_confmport.o moc_midieditor.o moc_cobject.o moc_value.o moc_transpose.o moc_miditransform.o moc_appearance.o -L/opt/qt/lib -
lsndfile -ljack -lpthread -lrt midiedit/libmidiedit.a ctrl/libctrl.a liste/libliste.a mixer/libmixer.a driver/libdriver.a marker/libmarker.a master/libmaster
.a waveedit/libwaveedit.a mplugins/libmplugins.a arranger/libarranger.a cliplist/libcliplist.a instruments/libinstruments.a widgets/libwidgets.a ../synti/lib
synti/.libs/libsynti.a -lasound -lm -ldl -lqt-mt -lqui
driver/libdriver.a(jack.o): In function `~JackAudioDevice':
/build/src/muse-0.9/muse/driver/jack.cpp:205: undefined reference to `jack_client_close'
/build/src/muse-0.9/muse/driver/jack.cpp:205: undefined reference to `jack_client_close'
/build/src/muse-0.9/muse/driver/jack.cpp:205: undefined reference to `jack_client_close'
driver/libdriver.a(jack.o): In function `initJackAudio()':
/build/src/muse-0.9/muse/driver/jack.cpp:232: undefined reference to `jack_set_error_function'
/build/src/muse-0.9/muse/driver/jack.cpp:243: undefined reference to `jack_client_new'
/build/src/muse-0.9/muse/driver/jack.cpp:243: undefined reference to `jack_client_new'
/build/src/muse-0.9/muse/driver/jack.cpp:243: undefined reference to `jack_client_new'
/build/src/muse-0.9/muse/driver/jack.cpp:243: undefined reference to `jack_client_new'
/build/src/muse-0.9/muse/driver/jack.cpp:243: undefined reference to `jack_client_new'
/build/src/muse-0.9/muse/driver/jack.cpp:235: undefined reference to `jack_set_error_function'
/build/src/muse-0.9/muse/driver/jack.cpp:254: undefined reference to `jack_set_error_function'
/build/src/muse-0.9/muse/driver/jack.cpp:262: undefined reference to `jack_get_sample_rate'
/build/src/muse-0.9/muse/driver/jack.cpp:263: undefined reference to `jack_get_buffer_size'
/build/src/muse-0.9/muse/driver/jack.cpp:264: undefined reference to `jack_set_thread_init_callback'
driver/libdriver.a(jack.o): In function `JackAudioDevice::graphChanged()':
/build/src/muse-0.9/muse/driver/jack.cpp:344: undefined reference to `jack_port_get_all_connections'
/build/src/muse-0.9/muse/driver/jack.cpp:424: undefined reference to `jack_port_get_all_connections'
driver/libdriver.a(jack.o): In function `JackAudioDevice::stopTransport()':
/build/src/muse-0.9/muse/driver/jack.cpp:846: undefined reference to `jack_transport_stop'
driver/libdriver.a(jack.o): In function `JackAudioDevice::getState()':
/build/src/muse-0.9/muse/driver/jack.cpp:798: undefined reference to `jack_transport_query'
driver/libdriver.a(jack.o): In function `JackAudioDevice::portName(void*)':
/build/src/muse-0.9/muse/driver/jack.cpp:771: undefined reference to `jack_port_name'
driver/libdriver.a(jack.o): In function `JackAudioDevice::outputPorts()':
/build/src/muse-0.9/muse/driver/jack.cpp:719: undefined reference to `jack_get_ports'
/build/src/muse-0.9/muse/driver/jack.cpp:721: undefined reference to `jack_port_by_name'
/build/src/muse-0.9/muse/driver/jack.cpp:722: undefined reference to `jack_port_flags'
/build/src/muse-0.9/muse/driver/jack.cpp:721: undefined reference to `jack_port_by_name'
/build/src/muse-0.9/muse/driver/jack.cpp:722: undefined reference to `jack_port_flags'
/build/src/muse-0.9/muse/driver/jack.cpp:721: undefined reference to `jack_port_by_name'
/build/src/muse-0.9/muse/driver/jack.cpp:722: undefined reference to `jack_port_flags'
driver/libdriver.a(jack.o): In function `JackAudioDevice::stop()':
/build/src/muse-0.9/muse/driver/jack.cpp:669: undefined reference to `jack_deactivate'
driver/libdriver.a(jack.o): In function `JackAudioDevice::start()':
/build/src/muse-0.9/muse/driver/jack.cpp:617: undefined reference to `jack_activate'
driver/libdriver.a(jack.o): In function `JackAudioDevice::disconnect(void*, void*)':
/build/src/muse-0.9/muse/driver/jack.cpp:593: undefined reference to `jack_port_name'
/build/src/muse-0.9/muse/driver/jack.cpp:594: undefined reference to `jack_port_name'
/build/src/muse-0.9/muse/driver/jack.cpp:599: undefined reference to `jack_disconnect'
driver/libdriver.a(jack.o): In function `JackAudioDevice::connect(void*, void*)':
/build/src/muse-0.9/muse/driver/jack.cpp:572: undefined reference to `jack_port_name'
/build/src/muse-0.9/muse/driver/jack.cpp:573: undefined reference to `jack_port_name'
/build/src/muse-0.9/muse/driver/jack.cpp:578: undefined reference to `jack_connect'
driver/libdriver.a(jack.o): In function `JackAudioDevice::registerClient()':
/build/src/muse-0.9/muse/driver/jack.cpp:512: undefined reference to `jack_set_process_callback'
/build/src/muse-0.9/muse/driver/jack.cpp:513: undefined reference to `jack_set_sync_callback'
/build/src/muse-0.9/muse/driver/jack.cpp:514: undefined reference to `jack_on_shutdown'
/build/src/muse-0.9/muse/driver/jack.cpp:515: undefined reference to `jack_set_buffer_size_callback'
/build/src/muse-0.9/muse/driver/jack.cpp:516: undefined reference to `jack_set_sample_rate_callback'
/build/src/muse-0.9/muse/driver/jack.cpp:517: undefined reference to `jack_set_port_registration_callback'
/build/src/muse-0.9/muse/driver/jack.cpp:518: undefined reference to `jack_set_graph_order_callback'
driver/libdriver.a(jack.o): In function `JackAudioDevice::inputPorts()':
/build/src/muse-0.9/muse/driver/jack.cpp:744: undefined reference to `jack_get_ports'
/build/src/muse-0.9/muse/driver/jack.cpp:746: undefined reference to `jack_port_by_name'
/build/src/muse-0.9/muse/driver/jack.cpp:747: undefined reference to `jack_port_flags'
/build/src/muse-0.9/muse/driver/jack.cpp:746: undefined reference to `jack_port_by_name'
/build/src/muse-0.9/muse/driver/jack.cpp:747: undefined reference to `jack_port_flags'
/build/src/muse-0.9/muse/driver/jack.cpp:746: undefined reference to `jack_port_by_name'
/build/src/muse-0.9/muse/driver/jack.cpp:747: undefined reference to `jack_port_flags'
driver/libdriver.a(jack.o): In function `JackAudioDevice::findPort(char const*)':
/build/src/muse-0.9/muse/driver/jack.cpp:873: undefined reference to `jack_port_by_name'
driver/libdriver.a(jack.o): In function `JackAudioDevice::seekTransport(unsigned int)':
/build/src/muse-0.9/muse/driver/jack.cpp:861: undefined reference to `jack_transport_locate'
driver/libdriver.a(jack.o): In function `JackAudioDevice::startTransport()':
/build/src/muse-0.9/muse/driver/jack.cpp:832: undefined reference to `jack_transport_start'
driver/libdriver.a(jack.o): In function `JackAudioDevice::setFreewheel(bool)':
/build/src/muse-0.9/muse/driver/jack.cpp:819: undefined reference to `jack_set_freewheel'
driver/libdriver.a(jack.o): In function `JackAudioDevice::unregisterPort(void*)':
/build/src/muse-0.9/muse/driver/jack.cpp:786: undefined reference to `jack_port_unregister'
driver/libdriver.a(jack.o): In function `JackAudioDevice::framePos() const':
/build/src/muse-0.9/muse/driver/jack.cpp:682: undefined reference to `jack_frame_time'
driver/libdriver.a(jack.o): In function `JackAudioDevice::registerOutPort(char const*)':
/build/src/muse-0.9/muse/driver/jack.cpp:546: undefined reference to `jack_port_register'
driver/libdriver.a(jack.o): In function `JackAudioDevice::registerInPort(char const*)':
/build/src/muse-0.9/muse/driver/jack.cpp:532: undefined reference to `jack_port_register'
driver/libdriver.a(jack.o): In function `JackAudioDevice::registerClient()':
/build/src/muse-0.9/muse/driver/jack.cpp:520: undefined reference to `jack_set_freewheel_callback'
driver/libdriver.a(jack.o): In function `JackAudioDevice::isRealtime()':
/build/src/muse-0.9/muse/driver/jackaudio.h:58: undefined reference to `jack_is_realtime'
driver/libdriver.a(jack.o): In function `JackAudioDevice::setPortName(void*, char const*)':
/build/src/muse-0.9/muse/driver/jackaudio.h:53: undefined reference to `jack_port_set_name'
driver/libdriver.a(jack.o): In function `JackAudioDevice::getBuffer(void*, unsigned long)':
/build/src/muse-0.9/muse/driver/jackaudio.h:37: undefined reference to `jack_port_get_buffer'
collect2: ld returned 1 exit status
make[4]: *** [muse] Error 1
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 23 September 2009, 06:13 GMT
muse 0.9 don't build. 1.0rc3 + patch builds fine.
Comment by Eric Belanger (Snowman) - Wednesday, 23 September 2009, 06:19 GMT
Should I update it to 1.0rc3 then? I don't use this stuff so I'm not sure how well I can test it.
Comment by Gerardo Exequiel Pozzi (djgera) - Wednesday, 23 September 2009, 06:24 GMT
Yes, and muse 0.9 is +2 years old.
Comment by Eric Belanger (Snowman) - Thursday, 24 September 2009, 05:03 GMT
1.0rc3 has the same error. Could you run namcap on the package and post the output? Maybe there's a missing depends. A buildlog (makepkg -L) might be useful too.
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 25 September 2009, 04:07 GMT
unset LDFLAGS is needed, because --as-needed ;)

Anyway attached a fixed PKGBUILD :)

* Use both build() and package().
* Removed uneeded deps.
* Add the patch for fix with glibc 2.10.
* Disabled static libs.
* Add a .install to update icon cache
Comment by Eric Belanger (Snowman) - Friday, 25 September 2009, 06:53 GMT
I've put an updated and fixed muse-1.0rc3-1 in testing. Please test and report how it works.
Comment by Gerardo Exequiel Pozzi (djgera) - Friday, 25 September 2009, 07:27 GMT
@Eric: Thanks. One dude, why not used the suggested PKGBUILD?. Use both build() and package() to restrict fakeroot usage to install step and disabled static libs, that are not used.
Comment by Eric Belanger (Snowman) - Friday, 25 September 2009, 07:55 GMT
I haven't seen anyone using both build() and package() functions except for splitted packages. Unless fakeroot is causing problems, probably people will continue using a single build function. Even pacman's PKGBUILD is still using a single build function.

As fore the static libs, I kept them in case a package needs it. It doesn't hurt to keep them.
Comment by Roman Kyrylych (Romashka) - Friday, 25 September 2009, 08:04 GMT
@Eric: about static libs, see  FS#16010  - do you think we need some kind of policy on this or just leave it for maintainers to decide in every specific case?
Comment by Eric Belanger (Snowman) - Friday, 25 September 2009, 08:25 GMT
@Roman: I don't know. I'm pretty much neutral on that. If you want a policy to have the static libs progressively removed from packages, start a thread on dev ML. I guess there will be cases where we'll need to keep them (like the libtool files).

Loading...