Bug 634014
Summary: | Large persistent messages cause seg fault | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise MRG | Reporter: | Mike Cressman <mcressma> | ||||
Component: | qpid-cpp | Assignee: | Kim van der Riet <kim.vdriet> | ||||
Status: | CLOSED ERRATA | QA Contact: | Jeff Needle <jneedle> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 1.2 | CC: | gsim, jneedle, tao, vdanen | ||||
Target Milestone: | 1.2.2 | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: |
C: sending a large (> 11 MB) persistent message to a queue
C: the broker gets a seg fault
F: changed to a more robust memory allocation scheme
R: memory is now successfully allocated allowing large persistent messages to be sent
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2010-10-08 01:50:31 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 640006 | ||||||
Attachments: |
|
Description
Mike Cressman
2010-09-14 22:11:09 UTC
This is 1.2 only, works fine with 1.3 Created attachment 447552 [details]
Patch which replaces alloca() with std::vector<char>()
The use of ::alloca() to allocate memory from the stack for a message encode buffer is efficient for small messages, but for large messages (>10MB) this can corrupt the stack. The crash occurs when attempting to encode into a buffer allocated using ::alloca(size) and size > 10MB.
I have replaced this with a std::vector<char>() instead and tested it with 100MB-sized messages.
Patch is attached.
Note that this patch must be applied *after* the existing mrg_1.2-el5.patch. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: C: sending a large (> 11 MB) persistent message to a queue C: the broker gets a seg fault F: changed to a more robust memory allocation scheme R: memory is now successfully allocated allowing large persistent messages to be sent An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0756.html |