View Issue Details

IDProjectCategoryView StatusLast Update
0006725VCOMPONENT-VKERNELIndexespublic2014-02-03 17:25
ReporterBeatrix WilliusAssigned ToIvan Smahin 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionduplicate 
PlatformINTELOSMAC OS OS Version*
Product Version 
Target VersionFixed in Version 
Summary0006725: Hard crash at fbl::VObjectPtr::get_IndexIterator
DescriptionGot a customer with a hard crash again because of the index:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libvkernel_fat_release.dylib 0x0b0a442f fbl::VObjectPtr::get_IndexIterator(fbl::smart_ptr<fbl::I_Table>, unsigned short) const + 397
1 libvkernel_fat_release.dylib 0x0b0a45aa non-virtual thunk to fbl::VObjectPtr::get_IndexIterator(fbl::smart_ptr<fbl::I_Table>, unsigned short) const + 44
2 libvkernel_fat_release.dylib 0x0b40f255 fbl::Join_Builder_2::ChooseInnerJoinAlg() + 309
3 libvkernel_fat_release.dylib 0x0b40f066 fbl::Join_Builder_2::DoInnerJoin(fbl::smart_ptr<fbl::Node_Explain>) + 68
4 libvkernel_fat_release.dylib 0x0b0674c8 fbl::Join_Builder_2::Build(fbl::smart_ptr<fbl::Node_Explain>) + 256
5 libvkernel_fat_release.dylib 0x0b28d462 fbl::Join_Builder::Build_2(fbl::smart_ptr<fbl::JoinPair>, fbl::smart_ptr<fbl::Node_Explain>) + 132
6 libvkernel_fat_release.dylib 0x0b28d124 fbl::Join_Builder::Build(fbl::smart_ptr<fbl::Node_Explain>) + 136
7 libvkernel_fat_release.dylib 0x0b149d0c fbl::Join(fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::JoinPair> > >, bool, fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::I_Field> > >, fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::TableOrAlias> > >, fbl::smart_ptr<fbl::Node_Explain>) + 275
8 libvkernel_fat_release.dylib 0x0b278b85 fbl::vsql::Node_Table_Join::ExecuteSql(fbl::vsql::SqlEnvironment&, fbl::smart_ptr<fbl::Node_Explain>) + 2113
9 libvkernel_fat_release.dylib 0x0b200955 fbl::vsql::Node_TableExpr::Execute_Select_FromN_Where(fbl::vsql::SqlEnvironment&, fbl::smart_ptr<fbl::Node_Explain>) + 645

The crash is reproducable for the customer. Crash logs are attached.
TagsNo tags attached.

Relationships

duplicate of 0006738 resolvedIvan Smahin Crash on join using vObjectPtr in case of IndexChanges = False 

Activities

Beatrix Willius

Beatrix Willius

2014-01-13 05:52

reporter  

CrashLogs (171,650 bytes)
Beatrix Willius

Beatrix Willius

2014-01-13 06:02

reporter   ~0007519

NEXT customer with same problem:

Process: Mail Archiver X [68220]
Path: /Applications/Mail Archiver X/Mail Archiver X.app/Contents/MacOS/Mail Archiver X
Identifier: com.mothsoftware.mailarchiverx
Version: 3.1 beta 1 20140112
  (3.1.0.3.834)
Code Type: X86 (Native)
Parent Process: launchd [184]
Responsible: Mail Archiver X [68220]
User ID: 501

Date/Time: 2014-01-12 08:38:43.684 -0800
OS Version: Mac OS X 10.9.1 (13B42)
Report Version: 11
Anonymous UUID: DA77DB4E-1EED-38EF-AFCA-17281D948582

Sleep/Wake UUID: 01133ABD-564F-4444-8071-D5D7CB9C24E3

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000

VM Regions Near 0:
--> __PAGEZERO 0000000000000000-0000000000001000 [ 4K] ---/--- SM=NUL /Applications/Mail Archiver X/Mail Archiver X.app/Contents/MacOS/Mail Archiver X
    __TEXT 0000000000001000-00000000012ea000 [ 18.9M] r-x/rwx SM=COW /Applications/Mail Archiver X/Mail Archiver X.app/Contents/MacOS/Mail Archiver X

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libvkernel_fat_release.dylib 0x0a44d42f fbl::VObjectPtr::get_IndexIterator(fbl::smart_ptr<fbl::I_Table>, unsigned short) const + 397
1 libvkernel_fat_release.dylib 0x0a44d5aa non-virtual thunk to fbl::VObjectPtr::get_IndexIterator(fbl::smart_ptr<fbl::I_Table>, unsigned short) const + 44
2 libvkernel_fat_release.dylib 0x0a7b8255 fbl::Join_Builder_2::ChooseInnerJoinAlg() + 309
3 libvkernel_fat_release.dylib 0x0a7b8066 fbl::Join_Builder_2::DoInnerJoin(fbl::smart_ptr<fbl::Node_Explain>) + 68
4 libvkernel_fat_release.dylib 0x0a4104c8 fbl::Join_Builder_2::Build(fbl::smart_ptr<fbl::Node_Explain>) + 256
5 libvkernel_fat_release.dylib 0x0a636462 fbl::Join_Builder::Build_2(fbl::smart_ptr<fbl::JoinPair>, fbl::smart_ptr<fbl::Node_Explain>) + 132
6 libvkernel_fat_release.dylib 0x0a636124 fbl::Join_Builder::Build(fbl::smart_ptr<fbl::Node_Explain>) + 136
7 libvkernel_fat_release.dylib 0x0a4f2d0c fbl::Join(fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::JoinPair> > >, bool, fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::I_Field> > >, fbl::smart_ptr<fbl::ArrayOfSmartPtrs<fbl::smart_ptr<fbl::TableOrAlias> > >, fbl::smart_ptr<fbl::Node_Explain>) + 275
8 li
Ivan Smahin

Ivan Smahin

2014-01-13 07:08

developer   ~0007520

Could you send me the database and the query to reproduce it?
Beatrix Willius

Beatrix Willius

2014-01-13 07:20

reporter   ~0007521

This looks like the query for the list of mails that is crashing here:

(SELECT Message.MailboxID,Message.RecID,Message.OriginatorFrom as [From],Message.ReceiverTo as [To],Message.MainSubject as [Subject],Message.MainDateTime as [Date],Message.AttachmentCount as [Att],MailboxName(Mailbox.Mailboxpath) as [Mailbox],lower(Message.OriginatorFrom) as [Order_From],lower(Message.ReceiverTo) as [Order_To],lower(Message.MainSubject) as [Order_Subject] FROM (Message INNER JOIN Mailbox ON Message.MailboxID = Mailbox.RecID) WHERE ( Message.MailboxID = :1 )) union (SELECT Message.MailboxID,Message.RecID,Message.OriginatorFrom as [From],Message.ReceiverTo as [To],Message.MainSubject as [Subject],Message.MainDateTime as [Date],Message.AttachmentCount as [Att],MailboxName(Mailbox.Mailboxpath) as [Mailbox],lower(Message.OriginatorFrom) as [Order_From],lower(Message.ReceiverTo) as [Order_To],lower(Message.MainSubject) as [Order_Subject] FROM ((Message INNER JOIN Mailbox ON Message.MailboxID = Mailbox.RecID) INNER JOIN AttachmentIDs ON Message.RecID = AttachmentIDs.MailID) WHERE ( Message.MailboxID = :1 )) ORDER By [Att] DESC, [Order_Subject] DESC

I don't think that I changed anything here between the last version of my app and the new one. Added some fields to the message table that don't show up in the main query.
Ruslan Zasukhin

Ruslan Zasukhin

2014-01-13 07:51

administrator   ~0007522

was change of valentina engine I think?
  from what version to what?

We need here DB + query.
Only query is not enough.
Beatrix Willius

Beatrix Willius

2014-01-13 08:11

reporter   ~0007523

Sigh... I work with Valentina every day and today I got the problem, too, when trying to make a little database example. Here it is: http://www.mothsoftware.com/downloads/mailarchive.zip .

The archive is quite new. I created it this morning and added some records to the 3 tables. A few minutes later I may have quit the app in the debugger. Then I added some records again to the message table, removed some records from the message table and finally added a record to the mailbox table.
Ruslan Zasukhin

Ruslan Zasukhin

2014-01-13 08:25

administrator   ~0007524

Beatrix, this archive to reproduce join crash?
or something totally else?

you have give us archive and what steps we need todo to see problem with it?
Beatrix Willius

Beatrix Willius

2014-01-13 08:42

reporter   ~0007525

Ruslan, yes the link above has an archive that had the crash. And now I can open the archive just fine. Bummer! And no I can't reproduce the crash. Would be too easy, wouldn't it?
Beatrix Willius

Beatrix Willius

2014-01-13 08:46

reporter   ~0007526

I have to correct myself: the database still shows the crash.
Ruslan Zasukhin

Ruslan Zasukhin

2014-01-13 08:51

administrator   ~0007527

okay,

so we can take this archive
open db in Valentina Studio
execute above SQL query
  see crash

right steps?
Ruslan Zasukhin

Ruslan Zasukhin

2014-01-13 09:22

administrator   ~0007528

above SQL command contains couple of :1

so I cannot execute it as is from VStudio.
what valid values can be here? show please to us ...
Beatrix Willius

Beatrix Willius

2014-01-13 09:22

reporter   ~0007529

No, I don't think so. I've tried in VStudio and don't get a crash.

At second glance this may be a timing issue. During adding of records I've got a progress bar running so that I need to do the adding of records in a thread. To get the window to show records afterwards I've got a timer which does the requery which Valentina pukes on. I remember "optimizing" something there when working on Valentina server some days ago.
Ruslan Zasukhin

Ruslan Zasukhin

2014-01-13 09:29

administrator   ~0007530

Can you come to ICQ or Skype to talk faster?

I did ask: what happens in last few days?
  you have give to users new version of your app with ANOTHER version of valentina engine?

which version was used? 5.5.1?
what version was before on hands of users?


========
aha, you say you made something from another thread ??

One thread do REINDEX
Second do what? Inserts?

This is in case ClientApp -> VServer?


And threads have own connections? no?
Beatrix Willius

Beatrix Willius

2014-01-13 10:06

reporter   ~0007531

The situation is far simpler: one thread write to the database, then there is a timer/thread combo that updates the progress bar. At the end of the write thread is a timer, which updates the window.

There is no client to server involved. And there is only one connection to the database.

Over Christmas/New Year I started working with the server. So I've changed to things to be able to work with server. But here is no server involved here. And in the last days I only fiddled around.

I'm in Messages.

Issue History

Date Modified Username Field Change
2014-01-13 05:52 Beatrix Willius New Issue
2014-01-13 05:52 Beatrix Willius File Added: CrashLogs
2014-01-13 06:02 Beatrix Willius Note Added: 0007519
2014-01-13 07:08 Ivan Smahin Note Added: 0007520
2014-01-13 07:20 Beatrix Willius Note Added: 0007521
2014-01-13 07:51 Ruslan Zasukhin Note Added: 0007522
2014-01-13 08:11 Beatrix Willius Note Added: 0007523
2014-01-13 08:25 Ruslan Zasukhin Note Added: 0007524
2014-01-13 08:42 Beatrix Willius Note Added: 0007525
2014-01-13 08:46 Beatrix Willius Note Added: 0007526
2014-01-13 08:51 Ruslan Zasukhin Note Added: 0007527
2014-01-13 09:22 Ruslan Zasukhin Note Added: 0007528
2014-01-13 09:22 Beatrix Willius Note Added: 0007529
2014-01-13 09:29 Ruslan Zasukhin Note Added: 0007530
2014-01-13 10:06 Beatrix Willius Note Added: 0007531
2014-02-03 17:24 Ivan Smahin Relationship added duplicate of 0006738
2014-02-03 17:24 Ivan Smahin Status new => closed
2014-02-03 17:25 Ivan Smahin Assigned To => Ivan Smahin
2014-02-03 17:25 Ivan Smahin Resolution open => duplicate