https://bugs.kde.org/show_bug.cgi?id=418544

            Bug ID: 418544
           Summary: heaptrack runs into assertion error in LineWriter.h
           Product: Heaptrack
           Version: 1.1.0
          Platform: Kubuntu Packages
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

SUMMARY

I used heaptrack to track memory in a Java VM with a JVMTI agent.

Soon after startup I see the following assertion error:

heaptrack_interpret:
/build/heaptrack-RiLtqJ/heaptrack-1.1.0+20180922.gitf752536/src/util/linewriter.h:84:
bool LineWriter::write(const char*, T ...) [with T = {const char*}]: Assertion
`false && "message doesn't fit into buffer"' failed.

I started heaptrack with --debug.

For some reason GDB does not stop at the assertion but milliseconds after
printing the error above it stops and shows:

Thread 3 "java" received signal SIGPIPE, Broken pipe.
[Switching to Thread 0x7ffff6071700 (LWP 11824)]
__libc_write (nbytes=4066, buf=0x602340, fd=3) at
../sysdeps/unix/sysv/linux/write.c:26
26      ../sysdeps/unix/sysv/linux/write.c: No such file or directory.
(gdb) bt
#0  __libc_write (nbytes=4066, buf=0x602340, fd=3) at
../sysdeps/unix/sysv/linux/write.c:26
#1  __libc_write (fd=3, buf=0x602340, nbytes=4066) at
../sysdeps/unix/sysv/linux/write.c:24
#2  0x00007ffff7fc2746 in heaptrack_malloc () from
/usr/lib/heaptrack/libheaptrack_preload.so
#3  0x00007ffff7fbfae8 in malloc () from
/usr/lib/heaptrack/libheaptrack_preload.so
#4  0x00007ffff5639595 in operator new (sz=34) at
../../.././libstdc++-v3/libsupc++/new_op.cc:50
#5  0x00007ffff567638d in std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> >::_M_mutate
(this=this@entry=0x7ffff60706c0, __pos=3, __len1=__len1@entry=0,
__s=0x7ffff00a2030 "JUMBO_ASYNC_MESSAGE_QUEUE_SIZE", __len2=30)

The resulting heaptrack file is very small and incomplete.

My agent has stripped symbols from the so and put it into a separate dbg file.
When I remove the dbg file, the assertion error goes away and heaptrack file is
much larger. Unfortunately without symbols for this so, the analysis is not
usable for me.

We use boost internally and I know that some of our symbol names are really
long (more than 1000 chars for mangled name). 

STEPS TO REPRODUCE

I can't provide a reproducer at this point.

OBSERVED RESULT

Incomplete trace.

EXPECTED RESULT

Complete trace.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 19.10
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.62.0
Qt Version: 5.12.4

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to