[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: partman hanging - was: Re: hfsprogs: Removal of sys/sysctl.h



Hi,

John Paul Adrian Glaubitz wrote:
> Valgrind didn't find any memory leaks, so I'm currently out of ideas:
> [..] valgrind --leak-check=yes ./parted_server
> [...]
> ==280387==     in use at exit: 0 bytes in 0 blocks

I had a look at the code and wonder how the variable "device_name"
gets freed after it was allocated in scan_device_name() by
        if (device_name != NULL)
                free(device_name);
        if (1 != iscanf("%ms", &device_name))
The only free() which looks like that, is the one i quote here.

So i wonder whether the valgrind run came through command_open() at all.


> ==280386== Cannot append to the log file

This message appears before a showstopper

                fprintf(stderr, "Cannot append to the log file\n");
                exit(255);

before main_loop() can get started.

main_loop() gives me the impression that parted_server would need to get a
command "OPEN" via
  /* Do fscanf from the input FIFO.  The arguments are the same as in
     the function `scanf' */
  #define iscanf(...) fscanf(infifo,__VA_ARGS__)

Did you provide such a command ?
I understand that the program creates a fifo /var/lib/partman/infifo
for receiving its commands.


Have a nice day :)

Thomas


Reply to: