{ "id": "63532", "key": "TIMOB-2900", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2012-01-26T15:21:11.000+0000", "created": "2011-04-15T03:32:25.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "deadlock", "threading" ], "versions": [], "issuelinks": [], "assignee": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T23:10:15.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "{html}

Titanium is sometimes getting stuck in a deadlock during app\r\nshutdown. Originally reported in \r\nhttps://appcelerator.lighthouseapp.com/projects/32238/tickets/2658-...\r\nand recently updated with info in this helpdesk ticket: http://developer.appcelerator.com/helpdesk/view/66761

\r\n

Because the main thread is getting stuck while waiting for the\r\nbridge to shut down, modules and the database never get a chance to\r\nunload. I have a user with quite a few instances of these deadlocks\r\nin his crash logs, and this user is also reporting problems with\r\nthe database my app uses, so I can't help but wonder whether the\r\nunclean shutdown could be related.

\r\n

I'm attaching three files that demonstrate the deadlock.\r\nTerminate.txt contains full debug info showing that the main thread\r\nis stuck on NSCondition's waitUntilDate. Terminate2.txt shows the\r\nproblem occurs on the KitchenSink and not just my app. Terminate*\r\nwere made with Ti 1.5.1; log2.txt is an older log made with a\r\nprevious version of Titanium.

{html}", "attachment": [ { "id": "18237", "filename": "anki_2011-01-30-122636_edwinbradfords-iphonecrash.txt", "author": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:26.000+0000", "size": 19592, "mimeType": "text/plain" }, { "id": "18236", "filename": "anki_2011-01-30-123924_edwinbradfords-iphonecrash.txt", "author": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:26.000+0000", "size": 20450, "mimeType": "text/plain" }, { "id": "18238", "filename": "log2.txt", "author": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:26.000+0000", "size": 22558, "mimeType": "text/plain" }, { "id": "18235", "filename": "terminate.txt", "author": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:26.000+0000", "size": 19912, "mimeType": "text/plain" }, { "id": "18234", "filename": "terminate2.txt", "author": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:26.000+0000", "size": 24530, "mimeType": "text/plain" } ], "flagged": false, "summary": "Deadlock in app termination for devices that don't support multitasking", "creator": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129659", "author": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

I have another user with similar crash reports who is reporting\na more serious issue: the app is freezing during normal operation.\nSince they can't do anything with the app, they hit the home\nbutton, and similar crash logs are generated. Attaching two from\nthis new user - one saying the app failed to terminate in time, and\none soon after where the app fails to 'resume' when restarted right\nafter (but the user is on 3.1.2)

{html}", "updateAuthor": { "name": "damienelmes", "key": "damienelmes", "displayName": "Damien Elmes", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:27.000+0000", "updated": "2011-04-15T03:32:27.000+0000" }, { "id": "129660", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Reading logs, this should be fixed by #2979.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:27.000+0000", "updated": "2011-04-15T03:32:27.000+0000" }, { "id": "129661", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

For in-app deadlocks, scheduled to look at threading in 1.7.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:32:27.000+0000", "updated": "2011-04-15T03:32:27.000+0000" }, { "id": "180761", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "iOS versions which do not support multitasking (<4.0) are no longer supported by Titanium.", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-01-26T15:21:11.000+0000", "updated": "2012-01-26T15:21:11.000+0000" }, { "id": "410930", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as the issue will not fix.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-09T23:10:15.000+0000", "updated": "2017-03-09T23:10:15.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }