[Desktop-packages] [Bug 1062534] Re: Thread unsafe access to internal linked list, breaks Origin games in Wine
** Changed in: xlibs Status: Confirmed => Unknown -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libx11 in Ubuntu. https://bugs.launchpad.net/bugs/1062534 Title: Thread unsafe access to internal linked list, breaks Origin games in Wine Status in xlibs: Unknown Status in libx11 package in Ubuntu: Triaged Bug description: In file src/xlibi18n/lcConv.c the following linked list head is defined static XlcConverterList conv_list = NULL; Which is then modified by _XlcSetConverter and get_converter in a non thread-safe manner. Inside get_converter the list is reorderder to increase the efficiency of looking up the same element the next time, but this is especially dangerous since a seemingly read-only method is actually modifying the data. Modifying the list in such thread unsafe manner does case the list to become garbled in some workloads and causes infinite loops when the get_converter is invoked. The solution I suggest is to add a mutex or spinlock around accesses to the linked list, I would it myself but I'm not sure about what is the usual mutex implementation for this project. To manage notifications about this bug go to: https://bugs.launchpad.net/xlibs/+bug/1062534/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1062534] Re: Thread unsafe access to internal linked list, breaks Origin games in Wine
you should post patches on xorg-devel@ and discuss the bug on the upstream bugtracker, if you want this to get forward ** Changed in: libx11 (Ubuntu) Importance: High => Medium ** Changed in: libx11 (Ubuntu) Assignee: Canonical X.org (canonical-x) => (unassigned) -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libx11 in Ubuntu. https://bugs.launchpad.net/bugs/1062534 Title: Thread unsafe access to internal linked list, breaks Origin games in Wine Status in xlibs: Confirmed Status in libx11 package in Ubuntu: Triaged Bug description: In file src/xlibi18n/lcConv.c the following linked list head is defined static XlcConverterList conv_list = NULL; Which is then modified by _XlcSetConverter and get_converter in a non thread-safe manner. Inside get_converter the list is reorderder to increase the efficiency of looking up the same element the next time, but this is especially dangerous since a seemingly read-only method is actually modifying the data. Modifying the list in such thread unsafe manner does case the list to become garbled in some workloads and causes infinite loops when the get_converter is invoked. The solution I suggest is to add a mutex or spinlock around accesses to the linked list, I would it myself but I'm not sure about what is the usual mutex implementation for this project. To manage notifications about this bug go to: https://bugs.launchpad.net/xlibs/+bug/1062534/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1062534] Re: Thread unsafe access to internal linked list, breaks Origin games in Wine
** Changed in: libx11 (Ubuntu) Assignee: (unassigned) => Canonical X.org (canonical-x) ** Changed in: libx11 (Ubuntu) Status: Confirmed => Triaged ** Changed in: libx11 (Ubuntu) Importance: Undecided => High -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libx11 in Ubuntu. https://bugs.launchpad.net/bugs/1062534 Title: Thread unsafe access to internal linked list, breaks Origin games in Wine Status in Modular X11 Libraries: Confirmed Status in “libx11” package in Ubuntu: Triaged Bug description: In file src/xlibi18n/lcConv.c the following linked list head is defined static XlcConverterList conv_list = NULL; Which is then modified by _XlcSetConverter and get_converter in a non thread-safe manner. Inside get_converter the list is reorderder to increase the efficiency of looking up the same element the next time, but this is especially dangerous since a seemingly read-only method is actually modifying the data. Modifying the list in such thread unsafe manner does case the list to become garbled in some workloads and causes infinite loops when the get_converter is invoked. The solution I suggest is to add a mutex or spinlock around accesses to the linked list, I would it myself but I'm not sure about what is the usual mutex implementation for this project. To manage notifications about this bug go to: https://bugs.launchpad.net/xlibs/+bug/1062534/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1062534] Re: Thread unsafe access to internal linked list, breaks Origin games in Wine
The attachment "0001-Improve-thread-safety-of-localization.patch" of this bug report has been identified as being a patch. The ubuntu- reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report. [This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.] ** Tags added: patch -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libx11 in Ubuntu. https://bugs.launchpad.net/bugs/1062534 Title: Thread unsafe access to internal linked list, breaks Origin games in Wine Status in Modular X11 Libraries: Confirmed Status in “libx11” package in Ubuntu: Confirmed Bug description: In file src/xlibi18n/lcConv.c the following linked list head is defined static XlcConverterList conv_list = NULL; Which is then modified by _XlcSetConverter and get_converter in a non thread-safe manner. Inside get_converter the list is reorderder to increase the efficiency of looking up the same element the next time, but this is especially dangerous since a seemingly read-only method is actually modifying the data. Modifying the list in such thread unsafe manner does case the list to become garbled in some workloads and causes infinite loops when the get_converter is invoked. The solution I suggest is to add a mutex or spinlock around accesses to the linked list, I would it myself but I'm not sure about what is the usual mutex implementation for this project. To manage notifications about this bug go to: https://bugs.launchpad.net/xlibs/+bug/1062534/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1062534] Re: Thread unsafe access to internal linked list, breaks Origin games in Wine
I'm attaching two internal pacthes that we use to fix the issue. They should be consider hacks to make the problem more clear. ** Patch added: "0001-Improve-thread-safety-of-localization.patch" https://bugs.launchpad.net/xlibs/+bug/1062534/+attachment/3445141/+files/0001-Improve-thread-safety-of-localization.patch -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libx11 in Ubuntu. https://bugs.launchpad.net/bugs/1062534 Title: Thread unsafe access to internal linked list, breaks Origin games in Wine Status in Modular X11 Libraries: Confirmed Status in “libx11” package in Ubuntu: Confirmed Bug description: In file src/xlibi18n/lcConv.c the following linked list head is defined static XlcConverterList conv_list = NULL; Which is then modified by _XlcSetConverter and get_converter in a non thread-safe manner. Inside get_converter the list is reorderder to increase the efficiency of looking up the same element the next time, but this is especially dangerous since a seemingly read-only method is actually modifying the data. Modifying the list in such thread unsafe manner does case the list to become garbled in some workloads and causes infinite loops when the get_converter is invoked. The solution I suggest is to add a mutex or spinlock around accesses to the linked list, I would it myself but I'm not sure about what is the usual mutex implementation for this project. To manage notifications about this bug go to: https://bugs.launchpad.net/xlibs/+bug/1062534/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1062534] Re: Thread unsafe access to internal linked list, breaks Origin games in Wine
** Patch added: "0001-Remove-an-optimization-that-is-thread-unsafe.patch" https://bugs.launchpad.net/xlibs/+bug/1062534/+attachment/3445142/+files/0001-Remove-an-optimization-that-is-thread-unsafe.patch -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libx11 in Ubuntu. https://bugs.launchpad.net/bugs/1062534 Title: Thread unsafe access to internal linked list, breaks Origin games in Wine Status in Modular X11 Libraries: Confirmed Status in “libx11” package in Ubuntu: Confirmed Bug description: In file src/xlibi18n/lcConv.c the following linked list head is defined static XlcConverterList conv_list = NULL; Which is then modified by _XlcSetConverter and get_converter in a non thread-safe manner. Inside get_converter the list is reorderder to increase the efficiency of looking up the same element the next time, but this is especially dangerous since a seemingly read-only method is actually modifying the data. Modifying the list in such thread unsafe manner does case the list to become garbled in some workloads and causes infinite loops when the get_converter is invoked. The solution I suggest is to add a mutex or spinlock around accesses to the linked list, I would it myself but I'm not sure about what is the usual mutex implementation for this project. To manage notifications about this bug go to: https://bugs.launchpad.net/xlibs/+bug/1062534/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp
[Desktop-packages] [Bug 1062534] Re: Thread unsafe access to internal linked list, breaks Origin games in Wine
I've realized that I've made a typo in the type. The problem is with _thread_ safety, not type safety of course. ** Summary changed: - Type unsafe access to internal linked list, breaks Origin games in Wine + Thread unsafe access to internal linked list, breaks Origin games in Wine -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to libx11 in Ubuntu. https://bugs.launchpad.net/bugs/1062534 Title: Thread unsafe access to internal linked list, breaks Origin games in Wine Status in Modular X11 Libraries: Confirmed Status in “libx11” package in Ubuntu: Confirmed Bug description: In file src/xlibi18n/lcConv.c the following linked list head is defined static XlcConverterList conv_list = NULL; Which is then modified by _XlcSetConverter and get_converter in a non thread-safe manner. Inside get_converter the list is reorderder to increase the efficiency of looking up the same element the next time, but this is especially dangerous since a seemingly read-only method is actually modifying the data. Modifying the list in such thread unsafe manner does case the list to become garbled in some workloads and causes infinite loops when the get_converter is invoked. The solution I suggest is to add a mutex or spinlock around accesses to the linked list, I would it myself but I'm not sure about what is the usual mutex implementation for this project. To manage notifications about this bug go to: https://bugs.launchpad.net/xlibs/+bug/1062534/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp