Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
work around weird glibc assert #54
Conversation
added a commit
that referenced
this pull request
Nov 20, 2015
hallyn
merged commit dd2aa06
into
lxc:master
Nov 20, 2015
1 check passed
continuous-integration/travis-ci/pr
The Travis CI build passed
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hallyn commentedNov 20, 2015
tl;dr realloc only in BATCH_SIZE increments.
longer version
I can't reproduce it separately yet, but on i386 xenial, lxcfs
is failing on reading meminfo, hitting a glibc assertion in malloc.c:
lxcfs: malloc.c:2373: 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.
The relevant glibc code:
/*
If not the first time through, we require old_size to be
at least MINSIZE and to have prev_inuse set.
*/
assert ((old_top == initial_top (av) && old_size == 0) ||
((unsigned long) (old_size) >= MINSIZE &&
prev_inuse (old_top) &&
((unsigned long) old_end & pagemask) == 0));
Signed-off-by: Serge Hallyn serge.hallyn@ubuntu.com