Ticket #133 (closed bug: fixed)

Opened 5 years ago

Last modified 4 years ago

Memory hog in libisofs bzr vreixo 392

Reported by: scdbackup Owned by: vreixo
Priority: blocker Milestone: libisofs-0.6.4
Component: libisofs [old] Version:
Keywords: Cc:

Description

To prepare for a new release of xorriso i switched from revision 387 to 392.

Now i get a SIGSEGV at the end of this command:

xorriso -dev /dev/hdc -toc

The program run does what is expected but crashes when the memory gets cleaned up finally.

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) where
#0  0x0000000000000000 in ?? ()
#1  0x0000000000470431 in iso_node_unref (node=0xb1e380) at libisofs/node.c:79
#2  0x00000000004703b7 in iso_node_unref (node=0xb1d530) at libisofs/node.c:52
#3  0x00000000004703b7 in iso_node_unref (node=0xb169a0) at libisofs/node.c:52
#4  0x00000000004703b7 in iso_node_unref (node=0xb06dc0) at libisofs/node.c:52
#5  0x00000000004703b7 in iso_node_unref (node=0xa44560) at libisofs/node.c:52
#6  0x00000000004703b7 in iso_node_unref (node=0x7121f0) at libisofs/node.c:52
#7  0x0000000000469bc9 in iso_image_unref (image=0x711c70)
    at libisofs/image.c:107
#8  0x00000000004584ac in isoburn_destroy (objpt=0x7fff418b5410, flag=0)
    at libisoburn/isoburn.c:122
#9  0x000000000045acee in isoburn_drive_release (drive=0x6a0060, eject=0)
    at libisoburn/burn_wrap.c:581
#10 0x0000000000428338 in Xorriso_give_up_drive (xorriso=0x2af869208010, 
    flag=3) at ./libisoburn-develop/xorriso/xorrisoburn.c:715
#11 0x000000000041dc83 in Xorriso_option_end (xorriso=0x2af869208010, flag=0)
    at ./libisoburn-develop/xorriso/xorriso.c:8948
#12 0x00000000004242b3 in Xorriso_interpreter (xorriso=0x2af869208010, argc=2, 
    argv=0x75fc20, idx=0x7fff418bb5cc, flag=0)
    at ./libisoburn-develop/xorriso/xorriso.c:11119
#13 0x00000000004258c8 in Xorriso_execute_option (xorriso=0x2af869208010, 
    line=0x7fff418bb600 "end", flag=131072)
    at ./libisoburn-develop/xorriso/xorriso.c:11459
---Type <return> to continue, or q <return> to quit---
#14 0x0000000000425c7c in Xorriso_dialog (xorriso=0x2af869208010, flag=0)
    at ./libisoburn-develop/xorriso/xorriso.c:11515
#15 0x00000000004265ff in main (argc=16, argv=0x7fff418bd728)
    at ./libisoburn-develop/xorriso/xorriso.c:11755

I switched back to revision 387 and all is well again. So i strongly believe that the problem is related to 392.

The media is a CD-RW with 27 sessions on it. A disk file does not cause a crash.

I put a breakpoint into node.c at line 74 where the extended info is non-NULL and thus to be freed. This breakpoint gets hit only with the CD-RW but not with the disk file. Some time after the breakpoint was hit, the program had a SIGSEGV again.

xorriso does not call iso_node_add_xinfo(). So i assume all ->xinfo should be NULL. But i see

Breakpoint 5, iso_node_unref (node=0xb1e3f0) at libisofs/node.c:74
74                  IsoExtendedInfo *info = node->xinfo;
(gdb) p node->xinfo
$3 = (IsoExtendedInfo *) 0xb1e360

Change History

Changed 5 years ago by scdbackup

I disabled the suspicious code (at the risk of a memory leak) and now the SIGSEGV is gone.

#ifdef NIX
        if (node->xinfo) {
            IsoExtendedInfo *info = node->xinfo;
            while (info != NULL) {
                IsoExtendedInfo *tmp = info->next;

                /* free extended info */
                info->process(info->data, 1);
                free(info);
                info = tmp;
            }
        }
#endif

Changed 5 years ago by scdbackup

  • status changed from new to closed
  • resolution set to fixed

The changes in vreixo 393 seem to have resolved the problem. All my use cases work without SIGSEGV now.

Changed 4 years ago by jing

Can you imagine how to  starting your own business?

Changed 4 years ago by bigqin

I'm gonna be 14 this summer. I have been looking online for  jobs for 14 year olds are aloud to have. and i have some ideas already but I'm not sure if i wanna do them. i also wanted to know, are 14 year olds aloud to work as waitresses? idk. does anyone have any ideas? Besides the fact that  jobs for 16 year olds are hard to come by, most places won't hire anyone that is 14. They aren't ALLOWED to due to labor laws. 16 is usually the youngest they allow.

Note: See TracTickets for help on using tickets.