Opened 16 years ago

Closed 15 years ago

#2760 closed bug (fixed)

Crash when sorting folder by extented attribute

Reported by: humdinger Owned by: anevilyak
Priority: high Milestone: R1
Component: Applications/Tracker Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is on vmware, hrev27404.

When I change the sort order to "Subject" in mail folder with 4500+ mails, Tracker's crashing. This is the serial log:

vm_soft_fault: va 0x0 not covered by area in address space
vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x1, ip 0x3b3446, write 0, user 1, thread 0xb0
vm_page_fault: thread "w>/exImage/mail/in" (176) in team "Tracker" (84) tried to read address 0x1, ip 0x3b3446 ("libbe.so_seg0ro" +0x1b1446)
stack trace:
  0x0056b369 (libtracker.so_seg0ro + 0x122369)
  0x0058a643 (libtracker.so_seg0ro + 0x141643)
  0x0058f89f (libtracker.so_seg0ro + 0x14689f)
  0x003ba127 (libbe.so_seg0ro + 0x1b8127)
  0x003b9ab6 (libbe.so_seg0ro + 0x1b7ab6)
  0x003b9c92 (libbe.so_seg0ro + 0x1b7c92)
  0x003b3ce1 (libbe.so_seg0ro + 0x1b1ce1)
  0x003b3b86 (libbe.so_seg0ro + 0x1b1b86)
  0x003b3eed (libbe.so_seg0ro + 0x1b1eed)
  0x0058e67b (libtracker.so_seg0ro + 0x14567b)
  0x0058a9f5 (libtracker.so_seg0ro + 0x1419f5)
  0x005ad7fb (libtracker.so_seg0ro + 0x1647fb)
  0x005acd77 (libtracker.so_seg0ro + 0x163d77)
  0x005ac449 (libtracker.so_seg0ro + 0x163449)
  0x00357949 (libbe.so_seg0ro + 0x155949)
  0x0035bacc (libbe.so_seg0ro + 0x159acc)
  0x002b1d93 (libbe.so_seg0ro + 0xafd93)
  0x006575a8 (libroot.so_seg0ro + 0x255a8)
  0x701c5fec (w>TrackerWindow_176_stack + 0x3ffec)
vm_soft_fault: va 0x0 not covered by area in address space
vm_page_fault: vm_soft_fault returned error 'Bad address' on fault at 0x0, ip 0x800c2bdc, write 0, user 0, thread 0xb0
debug_server: Thread 176 entered the debugger: Segment violation
stack trace, current PC 0x3b3446  ItemAt__C5BListl + 0x16:
  (0x701c59cc)  0x56b369  WidgetFor__CQ28BPrivate5BPoseUlPl + 0x45
  (0x701c59fc)  0x58a643  CheckPoseSortOrder__Q28BPrivate9BPoseViewPQ28BPrivate5BPosel + 0x1e3 (closest symbol)
  (0x701c5a3c)  0x58f89f  PoseCompareAddWidgetBinder__FPCQ28BPrivate5BPoseT0Pv + 0x27
  (0x701c5a6c)  0x3ba127  Compare__26PointerListHelperWithStatePCvT1 + 0x2b
  (0x701c5a9c)  0x3b9ab6  __unguarded_partition__H3ZPPvZPvZ10comparator_X01X01X11X21_X01 + 0x82
  (0x701c5adc)  0x3b9c92  __introsort_loop__H4ZPPvZPvZlZ10comparator_X01X01PX11X21X31_v + 0x1ae
  (0x701c5b3c)  0x3b3ce1  QuickSort__25AbstractPointerListHelperPPvll + 0x61
  (0x701c5b8c)  0x3b3b86  SortItems__25AbstractPointerListHelperP5BList + 0x3a
  (0x701c5bdc)  0x3b3eed  SortItems__13_PointerList_PFPCvPCvPv_iPv + 0x41
  (0x701c5c0c)  0x58e67b  SortItems__t11BObjectList1ZQ28BPrivate5BPosePFPCQ28BPrivate5BPosePCQ28BPrivate5BPosePv_iPv + 0x27
  (0x701c5c3c)  0x58a9f5  SortPoses__Q28BPrivate9BPoseView + 0x3d
  (0x701c5c7c)  0x5ad7fb  Clicked__Q28BPrivate15ColumnDragStateG6BPoint + 0x117
  (0x701c5ccc)  0x5acd77  MouseUp__Q28BPrivate16ColumnTrackStateG6BPoint + 0x53
  (0x701c5d0c)  0x5ac449  MouseUp__Q28BPrivate10BTitleViewG6BPoint + 0x41
  (0x701c5d3c)  0x357949  DispatchMessage__7BWindowP8BMessageP8BHandler + 0xd95
  (0x701c5f1c)  0x35bacc  task_looper__7BWindow + 0x270
  (0x701c5f7c)  0x2b1d93  _task0___7BLooperPv + 0x3f
  (0x701c5fac)  0x6575a8  _get_next_team_info + 0x5c (closest symbol)

Attachments (3)

testmail.zip (2.2 KB ) - added by humdinger 15 years ago.
Email with special chracter subject
13+4mails.zip (11.4 KB ) - added by humdinger 15 years ago.
4 mails with special characters in their Subject/From attribute + 13 dummy files
1audio+15text.zip (12.4 KB ) - added by aldeck 15 years ago.

Download all attachments as: .zip

Change History (22)

comment:1 by aldeck, 15 years ago

Priority: normalhigh

humdinger, can you still reproduce?

comment:2 by humdinger, 15 years ago

Yep. Still there. (vmware, hrev28381)

I have those mails on another vdmk image I can mount. In case that image should somehow been hosed, I just copied the folder to /boot/home/. Doing a "Get Info" on the folder says all files (106.2 MB in 4616 files) are there. Only, opening the folder, Tracker shows 1913 items, next time 939, next time 2160... and so on. A ls from Terminal confirms the number 4616, though.

Listing the original folder always shows all 4616 mails.

Some (spam) mails contain special characters that show in the subject and filename. Dunno if that plays a role.

The crashing when sorting doesn't always happen with the copied folder. Maybe that depends on how many items are shown...

comment:3 by aldeck, 15 years ago

"[...] Tracker shows 1913 items, next time 939, next time 2160... and so on."

hmm, i remember fixing something producing the same symptom in hrev28210. Might be related. I didn't try reproducing the crash yet.

comment:4 by aldeck, 15 years ago

Concerning the bug causing the view not creating all items. I found some infos when looking at #3011. I moved this issue to a new ticket now that it's more clear, see #3054

comment:5 by emitrax, 15 years ago

Out of curiosity, how much memory do you have? is this still with us?

comment:6 by humdinger, 15 years ago

Just tried again with hrev28837. Still crashing in vmware and when running natively. I'm running a Core2Duo@2ghz with 2gb RAM. VMware has 1gb assigned. According to "About..." Haiku used 108mb (natively) and 98mb (vmware) just before I let Tracker crash.

comment:7 by emitrax, 15 years ago

I don't know if it's related, but I just created a directory with 5000 empty files in it. Opening the directory with tracker never show all 5000 files but a lot less. To reproduce, simply do

for i in `seq -w 1 5000`; do touch file-$i; done

listing the files in terminal shows no problem. Latest revision used. Also "Get Info" on the directory shows correctly 5000 files.

comment:8 by emitrax, 15 years ago

Actually it now shows all files. Don't know why it behaved like that before. I now have 5000 files with different size and I did ordered them by size, name and date and I saw not crash. Running in vmware with 256Mb of memory.

Does the crash happen only when you sort by subject? If so it could be related to the special character in it you talked about.

comment:9 by humdinger, 15 years ago

You may be right. Tracker only crashes when sorting by Subject. This is an example of such a special character spam mail subject (also see attachement): ±Ý ±×¸©(¹æÂ¥ ³ò¼è)À» ¾Æ½Ê´Ï±î ? (±¤°í) . But nevertheless, I still never see all 4616 files. I just deleted all special character mails I can see, but Tracker still crashes on Subject sorting.

by humdinger, 15 years ago

Attachment: testmail.zip added

Email with special chracter subject

comment:10 by emitrax, 15 years ago

I'm currently unable to test with the zip you've attached but I'm wondering if you have tried to move a few of those emails with special character to a different directory and try to sort only those.

comment:11 by humdinger, 15 years ago

OK. I have 4 of those special mails. I copied them all to a folder. I can sort them by subject without crash. I then added more files with your above mentioned for/touch loop. Turns out when I add up to 12 additional files (12+4 mails) everything sorts OK, but adding one more (13+4 mails) is crashing Tracker when sorting by subject. Funny thing is, these special characters are also present in a file's name. But sorting the Name column always works without crash...

Also, I now moved those 4 special mails out of the big mail folder (4616 files). Still, sorting by subject crashes Tracker. Either I overlooked a special-character file or there's something very special going on with the subject column. Note: these special characters are also found in the filename and (in 2 of the 4 mails) in the From attribute which can be sorted without problem.

Strangeness.

comment:12 by emitrax, 15 years ago

If you can provide those 13+4 emails as a testcase, it would be helpful in order to reproduce the crash for other devs.

comment:13 by aldeck, 15 years ago

Hmm interesting. So it happens on small folders too. Is it always the same backtrace as in the ticket description?

Too be sure it's not related to highly populated folders, i've got a patch pending for #3054. I didn't have the time to fully test it and commit it back then. I'm gonna check it soon (today hopefully), i'll keep you updated, it might help narrow this one.

by humdinger, 15 years ago

Attachment: 13+4mails.zip added

4 mails with special characters in their Subject/From attribute + 13 dummy files

comment:14 by humdinger, 15 years ago

@aldeck: Yes, the backtrace is always more or less the same. I just had a look and the line (0x701c59fc) 0x58a643 CheckPoseSortOrder__Q28BPrivate9BPoseViewPQ28BPrivate5BPosel + 0x1e3 (closest symbol) was missing. But I guess that was just because this time I may have sorted a formerly unsorted column.

Thanks for looking into this, guys!

comment:15 by anevilyak, 15 years ago

Owner: changed from axeld to anevilyak
Status: newassigned

Will see what I can do with this one over the weekend, thanks for the testcase!

comment:16 by aldeck, 15 years ago

Summary: Crash when sorting populated folderCrash when sorting folder by extented attribute

While playing with Humdinger testcase, i found a new variant, a little more generic

Create a new folder, put 1 audio file and 16 textfiles, add the artist column, sort by artist.

It doesn't crash when the total file count is under 17. Reproducible only when sorting by an extended attribute. Works with email/subject too and probably any other type.

See attached test zip for convenience.

by aldeck, 15 years ago

Attachment: 1audio+15text.zip added

comment:17 by aldeck, 15 years ago

ugh, typo in the attached filename, that's 1audio+16text.zip, sorry :)

comment:18 by anevilyak, 15 years ago

This problem should no longer be visible as of hrev28871 ... there still seems to be a more fundamental issue I'm failing to see right now that needs to be fixed before I'd be comfortable with closing this ticket though.

comment:19 by anevilyak, 15 years ago

Resolution: fixed
Status: assignedclosed

Based on Ingo's feedback, this is definitely fixed. Please re-open if you see it again.

Note: See TracTickets for help on using tickets.