Skip to content

Unexpected behavior & segfault when adding two particular albums #417

Closed

Description

@ploopkazoo

There exist two very similar albums (same artist, similar album titles, similar track listing). When adding either of these albums to cmus, there is no issue. However, when adding both of them, only one shows up in the library, and upon attempting to quit, cmus segfaults without writing relevant information to cmus-debug.txt.

List of files in the two albums, with slight filename differences highlighted:
list_highlighted

cmus after attempting to add both albums, showing only one in the library:
cmus

Segfault upon quitting cmus:
segfault
I have been able to reproduce this on Ubuntu (cmus v2.5.0) and Parabola (v2.7.1 and v2.7.0-67-g6704e78). An archive of the particular files which cause the problem is available here.

Activity

  1. changed the title [-]Unexpected behavior & segfault when adding two albums[/-] [+]Unexpected behavior & segfault when adding two particular albums[/+] on Mar 19, 2016
  2. mahkoh commented on Mar 19, 2016

    @mahkoh
    Member

    The problem is that glibc's handling of CJK characters is broken. Those albums and tracks compare equal and due to various other bugs in cmus this causes the crash. I've created a branch here that removes collation and thus the problem from cmus.

  3. flyingmutant commented on Mar 19, 2016

    @flyingmutant
    Member

    @mahkoh, is there any open bug about glibc's broken CJK collation?

  4. mahkoh commented on Mar 19, 2016

    @mahkoh
    Member

    I don't know. But maybe you remember that some time ago there was a bug related to Hangul characters and glibc. I opened a bug back then and nothing has happened yet. So I don't think that such a bug which doesn't seem to affect many programs will be fixed anytime soon.

    One solution would be to use ICU instead of the POSIX functions. This could be an optional dependency so that glibc is used if ICU isn't installed (at compile time.)

  5. mahkoh commented on Mar 19, 2016

    @mahkoh
    Member

    If ICU also uses the locale data provided by glibc then this won't work though (I think.)

  6. flyingmutant commented on Mar 19, 2016

    @flyingmutant
    Member

    Oh, I do remember that indeed now, thanks.

    I am closing this as duplicate of #103. Regarding ICU — it might help, but it will effectively "fork" cmus installs in ICU-enabled and not. I am not sure I like that from the maintenance perspective (also, this is a departure from cmus' no-dependencies philosophy).

  7. mahkoh commented on Mar 19, 2016

    @mahkoh
    Member

    I don't think this issue should be closed. As it stands right now, OP cannot listen to his music in cmus which is certainly a serious cmus bug. Even if glibc returns an incorrect integer, this shouldn't cause cmus to crash. The related issue is closed too but wasn't as serious as this one.

  8. flyingmutant commented on Mar 19, 2016

    @flyingmutant
    Member

    Sound good – I've created a separate meta-issue #418 for that.

  9. added a commit that references this issue on Feb 25, 2017
    3e1c793
  10. added a commit that references this issue on Apr 29, 2017
    43e5a10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions