Re: Problem using mondoarchive on Ubuntu 16.04
"David C. Partridge" <[email protected]>
| Newsgroups | gmane.linux.mondo.devel |
|---|---|
| Message-ID | <[email protected]> |
I needed to set
EXTRA_SPACE=524288
as even 384kb was too small.
However, it didn't make sense to leave the backup running under valgrind,
as it would likely have taken all week to complete (so far 400MB in ten
minutes).
So if you have a fix for the memory problems shown in the valgrind report
below, I'd be most grateful.
==20481== Memcheck, a memory error detector
==20481== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al.
==20481== Using Valgrind-3.11.0 and LibVEX; rerun with -h for copyright info
==20481== Command: ./mondoarchive
==20481== Parent PID: 20427
==20481==
==20481== Warning: ignored attempt to set SIGKILL handler in sigaction();
==20481== the SIGKILL signal is uncatchable
==20481== Warning: ignored attempt to set SIGSTOP handler in sigaction();
==20481== the SIGSTOP signal is uncatchable
==20481== Invalid read of size 1
==20481== at 0x52A9454: ____strtol_l_internal (strtol_l.c:293)
==20481== by 0x4134E0: atol (stdlib.h:285)
==20481== by 0x4134E0: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2391)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481== Address 0x5fdba80 is 0 bytes inside a block of size 51 free'd
==20481== at 0x4C2EDEB: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x4E446B5: ??? (in /lib/x86_64-linux-gnu/libnewt.so.0.52.18)
==20481== by 0x4E42DA4: newtFormDestroy (in
/lib/x86_64-linux-gnu/libnewt.so.0.52.18)
==20481== by 0x4312F5: mr_popup_and_get_string (newt-specific.c:771)
==20481== by 0x4134BC: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2386)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481== Block was alloc'd at
==20481== at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x4E452F9: newtEntry (in
/lib/x86_64-linux-gnu/libnewt.so.0.52.18)
==20481== by 0x431247: mr_popup_and_get_string (newt-specific.c:760)
==20481== by 0x4134BC: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2386)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481==
==20481== Invalid read of size 1
==20481== at 0x52A9654: ____strtol_l_internal (strtol_l.c:433)
==20481== by 0x4134E0: atol (stdlib.h:285)
==20481== by 0x4134E0: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2391)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481== Address 0x5fdba81 is 1 bytes inside a block of size 51 free'd
==20481== at 0x4C2EDEB: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x4E446B5: ??? (in /lib/x86_64-linux-gnu/libnewt.so.0.52.18)
==20481== by 0x4E42DA4: newtFormDestroy (in
/lib/x86_64-linux-gnu/libnewt.so.0.52.18)
==20481== by 0x4312F5: mr_popup_and_get_string (newt-specific.c:771)
==20481== by 0x4134BC: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2386)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481== Block was alloc'd at
==20481== at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x4E452F9: newtEntry (in
/lib/x86_64-linux-gnu/libnewt.so.0.52.18)
==20481== by 0x431247: mr_popup_and_get_string (newt-specific.c:760)
==20481== by 0x4134BC: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2386)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481==
==20481== Invalid free() / delete / delete[] / realloc()
==20481== at 0x4C2EDEB: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x438453: mr_free_int (mr_mem.c:35)
==20481== by 0x41350B: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2393)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481== Address 0x5fdba80 is 0 bytes inside a block of size 51 free'd
==20481== at 0x4C2EDEB: free (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x4E446B5: ??? (in /lib/x86_64-linux-gnu/libnewt.so.0.52.18)
==20481== by 0x4E42DA4: newtFormDestroy (in
/lib/x86_64-linux-gnu/libnewt.so.0.52.18)
==20481== by 0x4312F5: mr_popup_and_get_string (newt-specific.c:771)
==20481== by 0x4134BC: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2386)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481== Block was alloc'd at
==20481== at 0x4C2FB55: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x4E452F9: newtEntry (in
/lib/x86_64-linux-gnu/libnewt.so.0.52.18)
==20481== by 0x431247: mr_popup_and_get_string (newt-specific.c:760)
==20481== by 0x4134BC: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2386)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481==
==20481== Invalid write of size 1
==20481== at 0x4236D1: get_non_rewind_dev (libmondo-stream.c:663)
==20481== by 0x405070: call_mindi_to_supply_boot_disks
(libmondo-archive.c:486)
==20481== by 0x40CF76: backup_data (libmondo-archive.c:381)
==20481== by 0x40331C: main (mondoarchive.c:358)
==20481== Address 0x60b552b is 0 bytes after a block of size 11 alloc'd
==20481== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x423656: get_non_rewind_dev (libmondo-stream.c:635)
==20481== by 0x405070: call_mindi_to_supply_boot_disks
(libmondo-archive.c:486)
==20481== by 0x40CF76: backup_data (libmondo-archive.c:381)
==20481== by 0x40331C: main (mondoarchive.c:358)
==20481==
==20481== Invalid read of size 1
==20481== at 0x52BCCC0: vfprintf (vfprintf.c:1632)
==20481== by 0x5385DC4: __vasprintf_chk (vasprintf_chk.c:66)
==20481== by 0x43856A: vasprintf (stdio2.h:210)
==20481== by 0x43856A: mr_asprintf_int (mr_mem.c:62)
==20481== by 0x422AA6: mt_says_tape_exists (libmondo-stream.c:236)
==20481== by 0x4236DB: get_non_rewind_dev (libmondo-stream.c:664)
==20481== by 0x405070: call_mindi_to_supply_boot_disks
(libmondo-archive.c:486)
==20481== by 0x40CF76: backup_data (libmondo-archive.c:381)
==20481== by 0x40331C: main (mondoarchive.c:358)
==20481== Address 0x60b552b is 0 bytes after a block of size 11 alloc'd
==20481== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x423656: get_non_rewind_dev (libmondo-stream.c:635)
==20481== by 0x405070: call_mindi_to_supply_boot_disks
(libmondo-archive.c:486)
==20481== by 0x40CF76: backup_data (libmondo-archive.c:381)
==20481== by 0x40331C: main (mondoarchive.c:358)
==20481==
==20481== Warning: ignored attempt to set SIGKILL handler in sigaction();
==20481== the SIGKILL signal is uncatchable
==20481== Warning: ignored attempt to set SIGSTOP handler in sigaction();
==20481== the SIGSTOP signal is uncatchable
==20481==
==20481== HEAP SUMMARY:
==20481== in use at exit: 1,445,929 bytes in 213 blocks
==20481== total heap usage: 2,881,115 allocs, 2,880,903 frees,
1,676,255,079 bytes allocated
==20481==
==20481== 9 bytes in 1 blocks are definitely lost in loss record 4 of 62
==20481== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x5385E27: __vasprintf_chk (vasprintf_chk.c:80)
==20481== by 0x43856A: vasprintf (stdio2.h:210)
==20481== by 0x43856A: mr_asprintf_int (mr_mem.c:62)
==20481== by 0x4106B4: mr_make_devlist_from_pathlist
(libmondo-devices.c:2083)
==20481== by 0x413DE7: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2859)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481==
==20481== 11 bytes in 1 blocks are definitely lost in loss record 5 of 62
==20481== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x423656: get_non_rewind_dev (libmondo-stream.c:635)
==20481== by 0x405070: call_mindi_to_supply_boot_disks
(libmondo-archive.c:486)
==20481== by 0x40CF76: backup_data (libmondo-archive.c:381)
==20481== by 0x40331C: main (mondoarchive.c:358)
==20481==
==20481== 28 bytes in 1 blocks are definitely lost in loss record 15 of 62
==20481== at 0x4C2DB8F: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==20481== by 0x5385E27: __vasprintf_chk (vasprintf_chk.c:80)
==20481== by 0x43856A: vasprintf (stdio2.h:210)
==20481== by 0x43856A: mr_asprintf_int (mr_mem.c:62)
==20481== by 0x41362F: interactively_obtain_media_parameters_from_user
(libmondo-devices.c:2643)
==20481== by 0x40340E: main (mondoarchive.c:336)
==20481==
==20481== LEAK SUMMARY:
==20481== definitely lost: 48 bytes in 3 blocks
==20481== indirectly lost: 0 bytes in 0 blocks
==20481== possibly lost: 0 bytes in 0 blocks
==20481== still reachable: 1,445,881 bytes in 210 blocks
==20481== suppressed: 0 bytes in 0 blocks
==20481== Reachable blocks (those to which a pointer was found) are not
shown.
==20481== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==20481==
==20481== For counts of detected and suppressed errors, rerun with: -v
==20481== ERROR SUMMARY: 12 errors from 8 contexts (suppressed: 0 from 0)
The invalid free and libmondo-devices.c is a stupid copy paste error and
also failing to set a freed pointer to NULL!!
The others problem will need you guys to fix the code
Bad Code:
mr_asprintf(tmp, "ls -l %s", bkpinfo->media_device);
if (run_program_and_log_output(tmp, FALSE)) {
log_to_screen("User has not specified a valid /dev
entry");
finish(1);
}
mr_free(tmp);
<------- tmp not set to NULL
mr_asprintf(sz_size,"%ld",bkpinfo->internal_tape_block_size);
tmp = mr_popup_and_get_string("Tape block size?", "What is
the block size of your tape streamer?", sz_size);
if (tmp == NULL) {
<------------------ Checking WRONG VARIABLE
log_to_screen("User has chosen not to backup the
PC");
finish(1);
}
bkpinfo->internal_tape_block_size = atol(tmp);
<---------- Using WRONG VARIABLE
mr_free(sz_size);
mr_free(tmp);
<----------------------- Illegal double free
Modified:
mr_asprintf(tmp, "ls -l %s", bkpinfo->media_device);
if (run_program_and_log_output(tmp, FALSE)) {
log_to_screen("User has not specified a valid /dev
entry");
finish(1);
}
mr_free(tmp); tmp=NULL;
mr_asprintf(sz_size,"%ld",bkpinfo->internal_tape_block_size);
tmp = mr_popup_and_get_string("Tape block size?", "What is
the block size of your tape streamer?", sz_size);
if (sz_size == NULL) {
log_to_screen("User has chosen not to backup the
PC");
finish(1);
}
bkpinfo->internal_tape_block_size = atol(tmp);
mr_free(sz_size); sz_size=NULL;
Thanks
Dave
-----Original Message-----
From: Gattegno, Victor [mailto:[email protected]]
Sent: 12 December 2016 14:53
To: 'Mondo mailing list'
Subject: Re: [Mondo-devel] Problem using mondoarchive on Ubuntu 16.04
Oups, no more BOOT_SIZE in your mindi version.
So try to increase EXTRA_SPACE parameter in /etc/mindi/mindi.conf file:
EXTRA_SPACE=160304
or:
EXTRA_SPACE=240000
Rgds, Victor
-----Original Message-----
From: Gattegno, Victor
Sent: lundi 12 décembre 2016 15:42
To: Mondo mailing list <[email protected]>
Subject: RE: [Mondo-devel] Problem using mondoarchive on Ubuntu 16.04
Hi Dave,
You can try to increase these parameters in /etc/mindi/mindi.conf file (or
in /usr/sbin/mindi shell-script) and run mondoarchive again:
BOOT_SIZE=262144
EXTRA_SPACE=160304
Rgds,
Victor
-----Original Message-----
From: David C. Partridge [mailto:[email protected]]
Sent: dimanche 11 décembre 2016 17:10
To: 'Mondo mailing list' <[email protected]>
Subject: Re: [Mondo-devel] Problem using mondoarchive on Ubuntu 16.04
I modified the configure script at line 3100 to set PACKAGE='mondorescue' so
that it could find its files where the normal installation put them.
I then rebuilt it again, and ran under valgrind.
I attach the valgrind log, and also the mondoarchive.log which shows it
running out of room on the loopback device or RAM disk it created :( So
even if it hadn't done an illegal free(), it would still have failed ...
If the attachments are rejected, please let me know where to upload them.
Dave
-----Original Message-----
From: David C. Partridge [mailto:[email protected]]
Sent: 11 December 2016 15:02
To: 'Mondo mailing list'
Subject: Re: [Mondo-devel] Problem using mondoarchive on Ubuntu 16.04
Does this help:
Starting program:
/home/amonra/Downloads/MondoRescue/mondo-3.2.2/src/mondoarchive/mondoarchive
[Thread debugging using libthread_db enabled] Using host libthread_db
library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Inferior 1 (process 548) exited with code 0177] Starting program:
/home/amonra/Downloads/MondoRescue/mondo-3.2.2/src/mondoarchive/mondoarchive
[Thread debugging using libthread_db enabled] Using host libthread_db
library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGABRT, Aborted.
0x00007ffff760f428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
Undefined command: "stack". Try "help".
#0 0x00007ffff760f428 in __GI_raise (sig=sig@entry=6) at
../sysdeps/unix/sysv/linux/raise.c:54
#1 0x00007ffff761102a in __GI_abort () at abort.c:89
#2 0x00007ffff76517ea in __libc_message (do_abort=do_abort@entry=2,
fmt=fmt@entry=0x7ffff776a2e0 "*** Error in `%s': %s: 0x%s ***\n") at
../sysdeps/posix/libc_fatal.c:175
#3 0x00007ffff7659e0a in malloc_printerr (ar_ptr=<optimised out>,
ptr=<optimised out>, str=0x7ffff776a3a8 "double free or corruption
(fasttop)", action=3) at malloc.c:5004
#4 _int_free (av=<optimised out>, p=<optimised out>, have_lock=0) at
malloc.c:3865
#5 0x00007ffff765d98c in __GI___libc_free (mem=<optimised out>) at
malloc.c:2966
#6 0x0000000000438444 in mr_free_int
(allocated=allocated@entry=0x7fffffffc3e8, line=line@entry=2393,
file=file@entry=0x43d877 "libmondo-devices.c") at mr_mem.c:35
#7 0x000000000041350c in interactively_obtain_media_parameters_from_user
(archiving_to_media=archiving_to_media@entry=1) at libmondo-devices.c:2393
#8 0x000000000040340f in main (argc=1, argv=0x7fffffffe598) at
mondoarchive.c:336
-----Original Message-----
From: David C. Partridge [mailto:[email protected]]
Sent: 11 December 2016 13:48
To: 'Mondo mailing list'
Subject: Re: [Mondo-devel] Problem using mondoarchive on Ubuntu 16.04
Ok let me ask what may be a better question:
What should I do now to get you the information you need to debug this.
Dave
-----Original Message-----
From: David C. Partridge [mailto:[email protected]]
Sent: 10 December 2016 11:50
To: [email protected]
Subject: [Mondo-devel] Problem using mondoarchive on Ubuntu 16.04
I'm trying to use Mondo Rescue for the first time.
I'm trying to write the backup to an iSCSI attached LTO-2 tape drive at
/dev/st0
I let the block size default to 32768 and immediately got a SIGABRT :(
DBG2: [Main] libmondo-tools.c->setup_tmpdir#705: Purging old tmpdir
/tmp/mondo.tmp.DcO7AM
DBG2: [Main] libmondo-tools.c->setup_tmpdir#740: bkpinfo->tmpdir is being
set to /tmp/mondo.tmp.KEtKDh
DBG2: [Main] libmondo-tools.c->setup_scratchdir#756: Purging old scratchdir
/tmp/mondo.scratch.O9bCzi
DBG2: [Main] libmondo-tools.c->setup_scratchdir#769: Created scratch
directory /shared
DBG2: [Main] libmondo-tools.c->setup_scratchdir#784: bkpinfo->scratchdir is
being set to /shared/mondo.scratch.u9dPLg
DBG3: [Main]
libmondo-devices.c->interactively_obtain_media_parameters_from_user#2212:
media type = tape
INFO:
INFO: running: ls -l /dev/st0 >
/tmp/mondo.tmp.KEtKDh/mondo-run-prog-thing.tmp 2>
/tmp/mondo.tmp.KEtKDh/mondo-run-prog-thing.err
INFO: --------------------------------start of
output-----------------------------
INFO: crw-rw---- 1 root tape 9, 0 Dec 10 11:22 /dev/st0
INFO: --------------------------------end of
output------------------------------
INFO: ...ran just fine. :-)
INFO: SIGABRT signal received from OS
INFO: Abort - probably failed assertion. I'm sleeping for a few seconds so
you can read the message.
DBG1: [Main] ../common/newt-specific.c->fatal_error#304: Fatal error
received - 'MondoRescue is terminating in response to a signal from the OS'
DBG3: [Main] ../common/newt-specific.c->fatal_error#320: OK, I think I'm the
main PID.
DBG2: [Main] ../common/newt-specific.c->fatal_error#327: I'm going to do
some cleaning up now.
DBG4: [Main] ../common/newt-specific.c->fatal_error#328: killall mindi 2>
/dev/null
What am I doing wrong?
Thanks
Dave
----------------------------------------------------------------------------
--
Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon
Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Mondo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mondo-devel
----------------------------------------------------------------------------
--
Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon
Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Mondo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mondo-devel
----------------------------------------------------------------------------
--
Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon
Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Mondo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mondo-devel
----------------------------------------------------------------------------
--
Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon
Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/xeonphi
_______________________________________________
Mondo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mondo-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot