Opened 13 years ago

Closed 13 years ago

#2172 closed Bug (wontfix)

Toggling Port Forwarding causes a lag

Reported by: Waldorf Owned by: charles
Priority: Normal Milestone: None Set
Component: libtransmission Version: 1.70
Severity: Normal Keywords:


These happen at an arbitrary amount of toggles.
Note: I'm on an Inte Mac using NAT-PMP, Port Forwarding was turn-on at startup.

1: PF was on, on turning it off
One time crash.

Thread 1 Crashed:
0   libSystem.B.dylib             	0x9000d5b8 small_malloc_from_free_list + 171
1   libSystem.B.dylib             	0x900052a6 szone_malloc + 397
2   libSystem.B.dylib             	0x900050d8 malloc_zone_malloc + 81
3   libSystem.B.dylib             	0x9000506c malloc + 55
4   org.m0k.transmission          	0x000b22ad soapPostSubmit + 188
5   org.m0k.transmission          	0x000b4257 simpleUPnPcommand + 637
6   org.m0k.transmission          	0x000b3305 UPNP_AddPortMapping + 294
7   org.m0k.transmission          	0x0005c01a tr_upnpPulse + 1368
8   org.m0k.transmission          	0x0006e5fb natPulse + 152
9   org.m0k.transmission          	0x0006e745 onTimer + 101
10  org.m0k.transmission          	0x000ac0ee event_base_loop + 1209
11  org.m0k.transmission          	0x000ac50a event_dispatch + 35
12  org.m0k.transmission          	0x0007e1f3 libeventThreadFunc + 191
13  libSystem.B.dylib             	0x90035155 _pthread_start + 321
14  libSystem.B.dylib             	0x90035012 thread_start + 34

2: On toggle On->Off->On
I used to reliably trigger this, until I triggered the next issue...

Thread 1 Crashed:
0   org.m0k.transmission          	0x000ab85e event_add + 24
1   org.m0k.transmission          	0x0006e792 onTimer + 178
2   org.m0k.transmission          	0x000ac0ee event_base_loop + 1209
3   org.m0k.transmission          	0x000ac50a event_dispatch + 35
4   org.m0k.transmission          	0x0007e1f3 libeventThreadFunc + 191
5   libSystem.B.dylib             	0x90035155 _pthread_start + 321
6   libSystem.B.dylib             	0x90035012 thread_start + 34

3: T hangs a short period when turning PF back on.

Change History (4)

comment:1 Changed 13 years ago by charles

Waldorf, I'm not able to reproduce this. Does this crash still exist in 1.72?

comment:2 Changed 13 years ago by charles

  • Summary changed from Toggling Port Forwarding causes all sorts of trouble to Toggling Port Forwarding causes a lag

According to Waldorf in irc, the crashes are fixed but there's still a lag when you toggle back and forth.

comment:3 Changed 13 years ago by charles

  • Component changed from Transmission to libtransmission
  • Owner set to charles

comment:4 Changed 13 years ago by charles

  • Resolution set to wontfix
  • Status changed from new to closed

After giving this some thought overnight, I think we're better off with T "hanging for a short period" when you turn port forwarding on.

That "short" hang is when Transmission is actually negotiating UPnP/NAT-PMP with the router. The alternative is to run the negotiation in a worker thread, which would prevent the lag. But if we do that, what does it mean if the user toggles the checkbox repeatedly very quickly? Should we queue up multiple negotiations as a result? Should we check for existing negotiations? What do we do if there's a negotiation in progress in a worker thread when the user turns port forwarding off?

All of these fringe cases could be handled, but IMO all the new code complications are not worth it for a very minor lag.

Note: See TracTickets for help on using tickets.