Opened 10 years ago

Closed 10 years ago

#392 closed defect (fixed)

A memory leakage in mondo-2.2.9.1-1

Reported by: robert Owned by: 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 (3)

partofmondoarchive.log (2.8 KB) - added by robert 10 years ago.
please check line 18
screenmessage.log (954 bytes) - added by robert 10 years ago.
mondoarchive.log (211.7 KB) - added by robert 10 years ago.
this is correct log.

Download all attachments as: .zip

Change History (13)

comment:1 Changed 10 years ago by robert

  • Owner changed from bruno to robert

comment:2 Changed 10 years ago 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 ?

Changed 10 years ago by robert

please check line 18

comment:3 Changed 10 years ago by robert

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

Changed 10 years ago by robert

comment:4 Changed 10 years ago by robert

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

comment:5 Changed 10 years ago 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.

Changed 10 years ago by robert

this is correct log.

comment:6 Changed 10 years ago by robert

Please check 5023 line in mondoarchive.log.

comment:7 Changed 10 years ago 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)

comment:8 Changed 10 years ago by bruno

  • Milestone changed from 2.2.10 to 2.2.9.3
  • Owner changed from robert to bruno
  • Status changed from new to assigned

Ah, sorry, indeed there is an issue !

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

comment:9 Changed 10 years ago by robert

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

comment:10 Changed 10 years ago by bruno

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.