Re: partman hanging - was: Re: hfsprogs: Removal of sys/sysctl.h
On 11/11/20 10:25 AM, Thomas Schmitt 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.
Good point! I have to admit I'm not too experienced with Valgrind.
>> ==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 ?
No, not yet when running valgrind. But I guess I should do that on the
test system. I'll try that, thanks for the suggestion.
> I understand that the program creates a fifo /var/lib/partman/infifo
> for receiving its commands.
Yes. One can send commands to that FIFO with "partman-command".
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Reply to: