﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
82	Archiving to tape leaves out most files (biggiefiles are ok)	andree	andree	"The undelying reason os that mondoarchive calls function make_afioballs_and_images_OLD() rather than make_afioballs_and_images() for tape archives. (This happens in function make_those_afios_phase().) At least this explains why there is different behaviour.

Changing the code so it calls make_afioballs_and_images() works fine until towards the end of archiving the normal files where it segfaults. Stupidly, gdb segfaults as well when this happens and I can't even get a backtrace. :-(

The screenout looks like this:
{{{
---progress-form---4--- TASK:  [********************]  97% done;  0:32 to go
---progress-form---1--- I am backing up your live filesystem now.
---progress-form---2--- Volume 1: 1,181,312 kilobytes archived so far
---progress-form---3--- Please wait. This may take a couple of hours.
---progress-form---E---
---progress-form---4--- TASK:  [********************]  98% done;  0:21 to go
---progress-form---1--- I am backing up your live filesystem now.
---progress-form---2--- Volume 1: 1,181,312 kilobytes archived so far
---progress-form---3--- Please wait. This may take a couple of hours.
---progress-form---E---
---progress-form---4--- TASK:  [********************]  98% done;  0:21 to go
---progress-form---1--- I am backing up your live filesystem now.
---progress-form---2--- Volume 1: 1,190,016 kilobytes archived so far
---progress-form---3--- Please wait. This may take a couple of hours.
---progress-form---E---
---progress-form---4--- TASK:  [********************]  99% done;  0:10 to go
(Unknown) signal received from OS

Fatal error... Mondoarchive is terminating in response to a signal from the OS
Fatal error... Execution run aborted (main loop)
Execution run ended; result=1
Type 'less /var/log/mondo-archive.log' to see the output log
}}}
The final rows of mondo-archive.log are this:
{{{
				[Main] libmondo-archive.c->archive_this_fileset#527: command='afio -o -b 131072 -M 16m -Z -P bzip2 -G 3 -T 3k -E /usr/share/mondo/do-not-compress-these /home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027/tmpfs/117.afio.bz2 < /home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027/filelist.117 2>> /var/log/mondo-archive.log'
[Main] libmondo-archive.c->make_afioballs_and_images#1729: AL DEBUG: At end of if in make_afioballs_and_images()
	[Main] libmondo-archive.c->make_afioballs_and_images#1683: Storing set 116
																			[Main] libmondo-files.c->does_file_exist#261: /home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027/filelist.116 exists
																			[Main] libmondo-files.c->does_file_exist#261: /home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027/tmpfs/116.afio.bz2 exists
running: cp -f /home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027/tmpfs/116.afio.bz2 /home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027/tmpfs/backcatalog > /tmp/mondo-run-prog-thing.tmp 2> /tmp/mondo-run-prog-thing.err
--------------------------------start of output-----------------------------
--------------------------------end of output------------------------------
...ran just fine. :-)
	[Main] libmondo-archive.c->make_afioballs_and_images#1699: libmondo-archive.c, make_afioballs_and_images, 1699: Writing EXAT files
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_START_EXTENDED_ATTRIBUTES (fname=xattr_list.116.gz, size=0 K)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_START_EXAT_FILE (fname=xattr_list.116.gz, size=0 K)
	[Main] libmondo-stream.c->write_file_to_stream_from_file#1620: Writing file 'xattr_list.116.gz' to tape (0 KB)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_START_FILE (fname=xattr_list.116.gz, size=0 K)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_STOP_FILE (fname=728eeead8447, size=0 K)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_STOP_EXAT_FILE (fname=xattr_list.116.gz, size=-1 K)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_START_EXAT_FILE (fname=acl_list.116.gz, size=0 K)
	[Main] libmondo-stream.c->write_file_to_stream_from_file#1620: Writing file 'acl_list.116.gz' to tape (0 KB)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_START_FILE (fname=acl_list.116.gz, size=0 K)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_STOP_FILE (fname=76103a4c9048, size=0 K)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_STOP_EXAT_FILE (fname=acl_list.116.gz, size=-1 K)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_STOP_EXTENDED_ATTRIBUTES (fname=xattr_list.116.gz, size=0 K)
																			[Main] libmondo-files.c->does_file_exist#261: /home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027/tmpfs/116.afio.bz2 exists
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_START_AN_AFIO_OR_SLICE (fname=116.afio.bz2, size=13184 K)
	[Main] libmondo-stream.c->write_file_to_stream_from_file#1620: Writing file '116.afio.bz2' to tape (13184 KB)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_START_FILE (fname=116.afio.bz2, size=13184 K)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_STOP_FILE (fname=0d7e3982cbca, size=0 K)
					[Main] libmondo-stream.c->write_header_block_to_stream#1728: BLK_STOP_AN_AFIO_OR_SLICE (fname=finished-writing-file, size=0 K)
[Main] libmondo-archive.c->make_afioballs_and_images#1729: AL DEBUG: At end of if in make_afioballs_and_images()
[Main] libmondo-archive.c->make_afioballs_and_images#1729: AL DEBUG: At end of if in make_afioballs_and_images()
[Main] libmondo-archive.c->make_afioballs_and_images#1729: AL DEBUG: At end of if in make_afioballs_and_images()
			[Main] libmondo-archive.c->create_afio_files_in_background#1222:                                          [8973:0] - archived 117 OK
																			[Main] libmondo-files.c->does_file_exist#258: /home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027/filelist.118 does not exist
		[Main] libmondo-archive.c->create_afio_files_in_background#1233:                                          [8973:0] - exiting
(Unknown) signal received from OS

	[Main] libmondo-fifo.c->kill_buffer#247: kill_buffer() --- command = ps auxww | grep -F ""buffer -m 32m -p75 -B -s32768 -o /dev/ht0 2>> /var/log/mondo-archive.log"" | grep -Fv grep | awk '{print $2;}' | grep -v PID | tr -s '
' ' ' | awk '{ print $1; }'
	[Main] libmondo-fifo.c->kill_buffer#250: kill_buffer() --- command = kill 2800
running: kill 2800 > /tmp/mondo-run-prog-thing.tmp 2> /tmp/mondo-run-prog-thing.err
--------------------------------start of output-----------------------------
--------------------------------end of output------------------------------
...ran just fine. :-)
[Main] newt-specific.c->fatal_error#377: Fatal error received - 'Mondoarchive is terminating in response to a signal from the OS'
		[Main] newt-specific.c->fatal_error#395: OK, I think I'm the main PID.
	[Main] newt-specific.c->fatal_error#403: I'm going to do some cleaning up now.
			[Main] newt-specific.c->fatal_error#404: killall mindi 2> /dev/null
running: kill `ps auxww | grep "" /mondo/do-not "" | awk '{print $1;}' | grep -vx ""\?""` > /tmp/mondo-run-prog-thing.tmp 2> /tmp/mondo-run-prog-thing.err
--------------------------------start of output-----------------------------
sh: line 0: kill: root: arguments must be process or job IDs
sh: line 0: kill: root: arguments must be process or job IDs
--------------------------------end of output------------------------------
...ran with res=256
running: kill `ps auxww | grep "" tmp.mondo "" | awk '{print $1;}' | grep -vx ""\?""` > /tmp/mondo-run-prog-thing.tmp 2> /tmp/mondo-run-prog-thing.err
--------------------------------start of output-----------------------------
sh: line 0: kill: root: arguments must be process or job IDs
sh: line 0: kill: root: arguments must be process or job IDs
sh: line 0: kill: root: arguments must be process or job IDs
--------------------------------end of output------------------------------
...ran with res=256
running: kill `ps auxww | grep "" ntfsclone "" | awk '{print $1;}' | grep -vx ""\?""` > /tmp/mondo-run-prog-thing.tmp 2> /tmp/mondo-run-prog-thing.err
--------------------------------start of output-----------------------------
sh: line 0: kill: root: arguments must be process or job IDs
sh: line 0: kill: root: arguments must be process or job IDs
sh: line 0: kill: root: arguments must be process or job IDs
--------------------------------end of output------------------------------
...ran with res=256
[Main] libmondo-archive.c->make_afioballs_and_images#1729: AL DEBUG: At end of if in make_afioballs_and_images()
[Main] newt-specific.c->fatal_error#377: Fatal error received - 'Execution run aborted (main loop)'
		[Main] newt-specific.c->fatal_error#395: OK, I think I'm the main PID.
		[Main] newt-specific.c->fatal_error#397: ...I'm already exiting. Give me time, Julian!
	[Main] libmondo-files.c->register_pid#812: Unregistering PID
running: umount /mnt/cdrom > /tmp/mondo-run-prog-thing.tmp 2> /tmp/mondo-run-prog-thing.err
--------------------------------start of output-----------------------------
umount: /mnt/cdrom: not mounted
--------------------------------end of output------------------------------
...ran with res=256
running: rm -Rf /mondo.scratch.* /tmp.mondo.* > /tmp/mondo-run-prog-thing.tmp 2> /tmp/mondo-run-prog-thing.err
--------------------------------start of output-----------------------------
--------------------------------end of output------------------------------
...ran just fine. :-)
running: rm -Rf /home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027 /home/mondorescue/scratch/mondo.scratch.7496/mondo.scratch.11697 > /tmp/mondo-run-prog-thing.tmp 2> /tmp/mondo-run-prog-thing.err
--------------------------------start of output-----------------------------
rm: cannot remove directory `/home/mondorescue/tmp/tmp.mondo.30609/tmp.mondo.7027/tmpfs': Device or resource busy
--------------------------------end of output------------------------------
...ran with res=256
	[Main] libmondo-tools.c->do_libmondo_global_strings_thing#1586: libmondo-tools.c, do_libmondo_global_strings_thing, 1586: Freeing globals
}}}

All not very informative I'm afraid.

We can either try to figure out what the differences in behaviour between make_afioballs_and_images_OLD() and than make_afioballs_and_images() are and fix this. Or we can try to fix above segmentation fault.

If you have an idea, Bruno, please let me know. Otherwise I'll keep plodding along...


(As a side note, the kill command fails because it should be $2 in the awk call not $1- that or ps_options needs be different.)"	defect	closed	normal	2.2.7	mondo	2.0.9	normal	worksforme		
