After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673103 - crash due to NMSecretAgent-vs-ShellNetworkAgent bookkeeping mismatch
crash due to NMSecretAgent-vs-ShellNetworkAgent bookkeeping mismatch
Status: RESOLVED DUPLICATE of bug 674961
Product: gnome-shell
Classification: Core
Component: general
3.4.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-03-29 18:49 UTC by Dan Winship
Modified: 2012-04-28 16:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
shell-network-agent: avoid a crash in a can't-happen case (1.10 KB, patch)
2012-03-29 18:50 UTC, Dan Winship
none Details | Review

Description Dan Winship 2012-03-29 18:49:55 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=783308 shows gnome-shell crashing because the NMSecretAgent base class is asking it to cancel a request that ShellNetworkAgent doesn't know about.

The only way it should be possible for this to happen is if ShellNetworkAgent removes a request from priv->requests without calling request->callback() first, and AFAICT, that never happens. So, I don't know what's going on here.

Presumably the request is not actually active at the time the user restarts NM. Rather, it was started at some point in the past, and the shell believed it completed, but libnm-glib never got the memo.

Anyway, this patch might avoid the crash (assuming that the problem is as described above, rather than just being memory corruption somewhere). Yes, it leaks memory, but not much, and you're not supposed to hit this case anyway. (Then again, it's also possible that the crash doesn't exist in 3.4, although there doesn't seem to be anything relevant changed in either gnome-shell or NM that would affect this. If anything, it would be the VPN-related changes in ShellNetworkAgent, but the code looks correct both before and after...)
Comment 1 Dan Winship 2012-03-29 18:50:11 UTC
Created attachment 210888 [details] [review]
shell-network-agent: avoid a crash in a can't-happen case

If we're asked to cancel a request that we don't know about, just warn
rather than crashing.

This can't happen, but apparently it does.
Comment 2 Tóth Balázs 2012-03-29 19:08:51 UTC
what can i do?
Comment 3 Dan Winship 2012-03-30 12:37:51 UTC
(In reply to comment #2)
> what can i do?

can you reproduce this bug reliably? If so, documenting the exact steps to cause it would be useful.
Comment 4 Giovanni Campagna 2012-04-28 16:08:04 UTC
Duping on newer bug which has more patches...

Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 674961 ***