Message ID | 20211122100435.2774211-1-dominique.martinet@atmark-techno.com |
---|---|
State | Changes Requested |
Headers | show |
Series | [1/2] swupdate -i: remove cleanup_files call in main() | expand |
On 22.11.21 11:04, Dominique Martinet wrote: > network_initializer() also calls cleanup_files. > Now there is almost no delay between the end of install_from_files and the > network threads cleaning up, the likelyhood of both threads calling > cleanup_files at the same time skyrocketed, leading to segfaults > because both threads try to free the same lists at the same time > > Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> > --- > > I started hitting segfaults on our CI after I integrated my patches > earlier. > It turns out making install_from_file return faster just made this > double-cleanup much more likely to be processed at the same time: please > merge this patch together with the others > > core/swupdate.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/core/swupdate.c b/core/swupdate.c > index d651f8ee7ca5..332d975eeccb 100644 > --- a/core/swupdate.c > +++ b/core/swupdate.c > @@ -876,7 +876,6 @@ int main(int argc, char **argv) > > if (opt_i) { > result = install_from_file(fname, opt_c); > - cleanup_files(&swcfg); Confirmed, this ist still a rest after cleaning up the two internal different paths, where installing with local files via -i had its own workflow. This call wasn't rather removed as it should be, thanks for fixing it. Best regards, Stefano Babic
diff --git a/core/swupdate.c b/core/swupdate.c index d651f8ee7ca5..332d975eeccb 100644 --- a/core/swupdate.c +++ b/core/swupdate.c @@ -876,7 +876,6 @@ int main(int argc, char **argv) if (opt_i) { result = install_from_file(fname, opt_c); - cleanup_files(&swcfg); } #ifdef CONFIG_SYSTEMD
network_initializer() also calls cleanup_files. Now there is almost no delay between the end of install_from_files and the network threads cleaning up, the likelyhood of both threads calling cleanup_files at the same time skyrocketed, leading to segfaults because both threads try to free the same lists at the same time Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com> --- I started hitting segfaults on our CI after I integrated my patches earlier. It turns out making install_from_file return faster just made this double-cleanup much more likely to be processed at the same time: please merge this patch together with the others core/swupdate.c | 1 - 1 file changed, 1 deletion(-)