Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#11688 closed Bug Report - Memory Leak (fixed)

Rapid memory consumption with running myth commands with --help

Reported by: dancy@… Owned by: wagnerrp
Priority: minor Milestone: 0.27
Component: MythTV - General Version: 0.26
Severity: medium Keywords:
Cc: Ticket locked: no

Description (last modified by wagnerrp)

For example, running "mythutil --help" results in no output but free memory on the system rapidly drops until I kill the process. If I run under gdb and control-c after a while, the backtrace is:

(gdb) bt
#0  0x000000303b6c19ee in QString::mid(int, int) const () from /lib64/libQtCore.so.4
#1  0x0000003046ef9b51 in wrapList(QStringList&, int) () from /lib64/libmythbase-0.26.so.0
#2  0x0000003046f28c75 in CommandLineArg::GetHelpString(int, QString, bool) const () from /lib64/libmythbase-0.26.so.0
#3  0x0000003046f34712 in MythCommandLineParser::GetHelpString() const () from /lib64/libmythbase-0.26.so.0
#4  0x0000003046f34d80 in MythCommandLineParser::PrintHelp() const () from /lib64/libmythbase-0.26.so.0
#5  0x0000000000405ca5 in main (argc=2, argv=<optimized out>) at main.cpp:124

Attachments (0)

Change History (5)

comment:1 Changed 9 months ago by wagnerrp

  • Owner set to wagnerrp
  • Status changed from new to assigned

comment:2 Changed 9 months ago by wagnerrp

  • Description modified (diff)

comment:3 Changed 9 months ago by wagnerrp

Could you describe the circumstances a bit more? The only scenario I can find that might produce this issue is when your console is too narrow to actually display the command line arguments without wrapping, much less the help text.

comment:4 Changed 9 months ago by Raymond Wagner <rwagner@…>

  • Resolution set to fixed
  • Status changed from assigned to closed

In 1ebf70131c868160b3a6225e99f11c0c5a900bff/mythtv:

Correct issue where too narrow a console can break help output

If the terminal width used to display the help output is narrower than
the longest defined argument, the command line parser will attempt to
wrap the help text at a negative length, and will eventually OOM. This
makes sure that the wrap function does not allow that, and tries to
behave a bit more intelligently during help output.

Fixes #11688

comment:5 Changed 9 months ago by paulh

  • Milestone changed from unknown to 0.27

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.