Bug 1276334
Summary: | Data Tiering:tiering deamon crashes when trying to heat the file | ||||||
---|---|---|---|---|---|---|---|
Product: | [Red Hat Storage] Red Hat Gluster Storage | Reporter: | Nag Pavan Chilakam <nchilaka> | ||||
Component: | tier | Assignee: | Nithya Balachandran <nbalacha> | ||||
Status: | CLOSED ERRATA | QA Contact: | Sweta Anandpara <sanandpa> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | urgent | ||||||
Version: | rhgs-3.1 | CC: | dlambrig, nbalacha, rcyriac, rhs-bugs, storage-qa-internal | ||||
Target Milestone: | --- | Keywords: | ZStream | ||||
Target Release: | RHGS 3.1.2 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | glusterfs-3.7.5-6 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1276562 (view as bug list) | Environment: | |||||
Last Closed: | 2016-03-01 05:48:48 UTC | Type: | Bug | ||||
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: | 1260783, 1260923, 1276562, 1277587 | ||||||
Attachments: |
|
Description
Nag Pavan Chilakam
2015-10-29 13:35:34 UTC
sosreports: [nchilaka@rhsqe-repo bug.1276334]$ pwd /home/repo/sosreports/nchilaka/bug.1276334 [nchilaka@rhsqe-repo bug.1276334]$ hostname rhsqe-repo.lab.eng.blr.redhat.com From the core: (gdb) bt #0 0x00007f03c13315d7 in raise () from /lib64/libc.so.6 #1 0x00007f03c1332cc8 in abort () from /lib64/libc.so.6 #2 0x00007f03c1371e07 in __libc_message () from /lib64/libc.so.6 #3 0x00007f03c1409a57 in __fortify_fail () from /lib64/libc.so.6 #4 0x00007f03c1407c10 in __chk_fail () from /lib64/libc.so.6 #5 0x00007f03b47e76ac in strcpy (__src=<optimized out>, __dest=0x7f038affad20 "(Www.Black-E-Clipz.Skyrock.Com).mp3,/") at /usr/include/bits/string3.h:104 #6 tier_parse_query_str (link_size=0x7f0380000998, link_buffer=<optimized out>, gfid=0x7f038affad20 "(Www.Black-E-Clipz.Skyrock.Com).mp3,/", query_record_str=0x7f038affbe20 "(Www.Black-E-Clipz.Skyrock.Com).mp3,/Just") at tier.c:55 #7 tier_migrate_using_query_file (_args=0x7f0380007580) at tier.c:311 #8 tier_migrate_files_using_qfile (query_cbk_args=query_cbk_args@entry=0x7f038affce90, qfile=<optimized out>, comp=0x7f03ace1dc60) at tier.c:1059 #9 0x00007f03b47e8835 in tier_promote (args=0x7f03ace1dc60) at tier.c:1136 #10 0x00007f03c1aabdf5 in start_thread () from /lib64/libpthread.so.0 #11 0x00007f03c13f21ad in clone () from /lib64/libc.so.6 The names of the files being promoted had spaces. The tier_migrate_using_query_file function uses fscanf to read the query_file. fscanf treats spaces as a delimiter, completely messing up the parsing and causing the crash when a name was copied into the gfid buffer overflowing it. Solution: Use fgets() instead of fscanf(). Wrote a test program to read the promote query file using fscanf and fgets. Each line represents the contents of the buffer after a single fscanf/fgets call for the first two records: Output with fscanf: ------------------- 69d34f4c-377e-47af-85b2-a56d4f21a44f|00000000-0000-0000-0000-000000000001,01 Adele - Rolling in the Deep.mp3,/01 Adele - Rolling in the Deep.mp3,0,0|111 8aed7fc4-62db-47dc-b208-d39c3a7e4ebf|00000000-0000-0000-0000-000000000001,01 Adele - Set Fire to the Rain Lyrics‏.mp3,/01 Adele - Set Fire to the Rain Output with fgets: ------------------- 69d34f4c-377e-47af-85b2-a56d4f21a44f|00000000-0000-0000-0000-000000000001,01 Adele - Rolling in the Deep.mp3,/01 Adele - Rolling in the Deep.mp3,0,0|111 8aed7fc4-62db-47dc-b208-d39c3a7e4ebf|00000000-0000-0000-0000-000000000001,01 Adele - Set Fire to the Rain Lyrics‏.mp3,/01 Adele - Set Fire to the Rain Lyrics‏.mp3,0,0|137 Tested and verified the above bug on the build glusterfs-3.7.5-7.el7rhgs.x86_64 Created 50 files with names that included spaces, on a 2*2 regular volume. Attached a tier and accessed about 20 files- which were moved to hot tier. Created new files and they were created in the hot tier. Changed the mode to test and set the write counter to 5. Waited for the session time and all the files were moved back to the cold tier. Heated up 20 different files again (with writes) which were moved to hot tier and were shifted back to cold tier upon no access. No crashes were observed, with the expected output. Moving this bug to verified in 3.1.2. Detailed logs are attached. Created attachment 1102132 [details]
Server and client logs
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-0193.html |