Ticket #392 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

A memory leakage in mondo-2.2.9.1-1

Reported by: robert Assigned to: bruno
Priority: normal Milestone: 2.2.9.3
Component: mondo Version: 2.2.9.1
Severity: normal Keywords:
Cc:

Description

mondoarchive doesn't work on backing up Windows
A memory leakage occurrs at below line marked as ##. Just delete this could be ok.

src/common/libmondo-archive.c

:
:

default:

log_msg(2,

"feed_into_ntfsprog() called in background --- pid=%ld",
(long int) (pid));

mr_free(sz_devfile); ## delete this line

}

Attachments

partofmondoarchive.log (2.8 kB) - added by robert on 02/09/10 09:58:49.
please check line 18
screenmessage.log (0.9 kB) - added by robert on 02/09/10 10:19:12.
mondoarchive.log (211.7 kB) - added by robert on 02/09/10 12:35:09.
this is correct log.

Change History

02/05/10 08:04:14 changed by robert

  • owner changed from bruno to robert.

02/05/10 16:25:16 changed by bruno

  • milestone changed from 2.2.9.2 to 2.2.10.

I disagree with your analysis. Removing such a line will never allow you to solve a memory *leak* problem. Rather it will create one.

The sz_devfile var is allocated by the mr_asprintf just upper. So it needs to be freed after its usage in the parent.

So what is your problem and could you provide log files please ?

02/09/10 09:58:49 changed by robert

  • attachment partofmondoarchive.log added.

please check line 18

02/09/10 10:04:42 changed by robert

Please check the attachement. I just picked up the error part of the log.

02/09/10 10:19:12 changed by robert

  • attachment screenmessage.log added.

02/09/10 10:22:13 changed by robert

Of course, -x /dev/sda1 option was used for mondoarchive command.

02/09/10 11:22:43 changed by bruno

So your real error is *not* a memory leak, but an impossibility to open a device:

Cannot archive bigfile '/dev/sda1': not found

Now, I still need the *full* log file in order to understand what may happen. But with the above message check that you can access /dev/sda1 already.

02/09/10 12:35:09 changed by robert

  • attachment mondoarchive.log added.

this is correct log.

02/09/10 12:38:09 changed by robert

Please check 5023 line in mondoarchive.log.

02/09/10 12:53:59 changed by robert

Breakpoint 1, make_slices_and_images (

biggielist_fname=0x8848c70 "/tmp/mondo.scratch.1200/mondo.scratch.2382/archives/biggielist.txt") at libmondo-archive.c:2112[[BR]]

2112 log_msg(2,
(gdb) display ntfsprog_fifo
1: ntfsprog_fifo = 0x88453d0 "/tmp/mondo.tmp.UjKSLQ/8364.441.000"
(gdb) display sz_devfile
2: sz_devfile = 0x88453d0 "/tmp/mondo.tmp.UjKSLQ/8364.441.000"
(gdb) n
2115 mr_free(sz_devfile);
2: sz_devfile = 0x88453d0 "/tmp/mondo.tmp.UjKSLQ/8364.441.000"
1: ntfsprog_fifo = 0x88453d0 "/tmp/mondo.tmp.UjKSLQ/8364.441.000"
(gdb)
2112 log_msg(2,
2: sz_devfile = 0x88453d0 "/tmp/mondo.tmp.UjKSLQ/8364.441.000"
1: ntfsprog_fifo = 0x88453d0 "/tmp/mondo.tmp.UjKSLQ/8364.441.000"
(gdb)
2115 mr_free(sz_devfile);
2: sz_devfile = 0x88453d0 "/tmp/mondo.tmp.UjKSLQ/8364.441.000"
1: ntfsprog_fifo = 0x88453d0 "/tmp/mondo.tmp.UjKSLQ/8364.441.000"
(gdb)
2124 if (IS_THIS_A_STREAMING_BACKUP(bkpinfo->backup_media_type)) {
2: sz_devfile = 0x0
1: ntfsprog_fifo = 0x88453d0 "\b\213\204\b/mondo.tmp.UjKSLQ/8364.441.000"
(gdb)
2130 res =
2: sz_devfile = 0x0
1: ntfsprog_fifo = 0x88453d0 "\b\213\204\b/mondo.tmp.UjKSLQ/8364.441.000"
(gdb)

02/12/10 13:36:17 changed by bruno

  • owner changed from robert to bruno.
  • status changed from new to assigned.
  • milestone changed from 2.2.10 to 2.2.9.3.

Ah, sorry, indeed there is an issue !

So sz_devfile is clearly freed too early. What about the proposed patch in rev [2578] ?

02/15/10 08:29:07 changed by robert

Thanks so much!
It works. So, please close the issue.

02/15/10 13:38:26 changed by bruno

  • status changed from assigned to closed.
  • resolution set to fixed.