View Issue Details

IDProjectCategoryView StatusLast Update
0002340SOGoBackend Calendarpublic2013-06-14 18:59
ReporterLudovic Hutin Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status closedResolutionfixed 
Product Version2.0.5a 
Target Version2.0.6Fixed in Version2.0.6 
Summary0002340: Timeout problem
Description

Hello all,

We got a very strange problem, we got some requests who went into timeout

In the nginx log we can see that

2013/06/14 14:46:04 [error] 20456#0: *223964 upstream timed out (110: Connection timed out) while reading response header from upstream, client: ::ffff:XX.XX.XX.XX, server: SERVER_SOGO, request: "REPORT /SOGo/dav/user_A/Calendar/user_B/ HTTP/1.1", upstream: "http://127.0.0.1:20000/SOGo/dav/user_A/Calendar/user_B/", host: "SERVER_SOGO:8843"

We can add this calendar into Thunderbird without any problem.
Other calendar for other user who synchronise with a iphone work.

The problem appear only when a iphone try to refresh with a "REPORT" command.
On the server side, we can see at least 1 process at 100% CPU.

There is no segmentation fault, the process is sometimes kill by the WatchDogChild but not at each time.

With gdb bt full we got that

#0 0x00007f2b9a9e415f in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
0000001 0x00007f2b9a9ddb67 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
No symbol table info available.
0000002 0x00007f2b9b7e001b in ?? () from /usr/lib/libgnustep-base.so.1.22
No symbol table info available.
0000003 0x00007f2b9b992d94 in ?? () from /usr/lib/libgnustep-base.so.1.22
No symbol table info available.
0000004 0x00007f2b9b993ca7 in ?? () from /usr/lib/libgnustep-base.so.1.22
No symbol table info available.
0000005 0x00007f2b9d4742a5 in -[NSString(NGCardsExtensions) escapedForCards] (self=0x7f2ba897d950, _cmd=0x7f2b9d69ce40) at NSString+NGCards.m:160
string = 0x7ffff13e2ac0
0000006 0x00007f2b9d473477 in -[NSArray(NGCardsVersit) _renderAsSubValuesInString:asAttributes:] (self=0x7f2ba88c44f0, _cmd=0x7f2b9d69ce60, aString=0x7f2ba8962c60, asAttributes=1 '\001') at NSDictionary+NGCards.m:64
count = 0
max = 1
subValue = 0x7f2ba897d950
escaped = 0x7f2ba88c44f0
previousWasEmpty = 1 '\001'
rendered = 0 '\000'
0000007 0x00007f2b9d473a0e in -[NSDictionary(NGCardsExtension) versitRenderInString:withKeyOrdering:asAttributes:] (self=0x7f2ba88c3910, _cmd=0x7f2b9d6a10c0, aString=0x7f2ba8962b20, ordering=0x0, asAttributes=1 '\001') at NSDictionary+NGCards.m:166
keys = 0x7f2ba8962c20
count = 0
max = 1
rendered = 0
keyIndex = 139825312347166
newKeyIndex = 0
orderedValues = 0x7f2ba88c44f0
key = 0x7f2ba88c45b0
substring = 0x7f2ba8962c60
0000008 0x00007f2b9d479568 in -[CardVersitRenderer renderElement:] (self=0x7f2ba8916430, _cmd=0x7f2b9d6a0fe0, anElement=0x7f2ba88c3e80) at CardVersitRenderer.m:83
rendering = 0x7f2ba8962b20
attributes = 0x7f2ba88c3910
values = 0x0
finalRendering = 0x7f2b9bce6240
tag = 0x7f2ba7981140
0000009 0x00007f2b9d4792c1 in -[CardVersitRenderer render:] (self=0x7f2ba8916430, _cmd=0x7f2b9d6a11b0, anElement=0x7f2ba88c3e80) at CardVersitRenderer.m:51
No locals.
0000010 0x00007f2b9d479a5d in -[CardVersitRenderer renderGroup:] (self=0x7f2ba8916430, _cmd=0x7f2b9d6a0fd0, aGroup=0x7f2ba88b6090) at CardVersitRenderer.m:155
children = 0x7f2ba89616a0
currentChild = 0x7f2ba88c3e80
rendering = 0x7f2ba8961600
groupTag = 0x7f2ba8961660
order = 0x0
0000011 0x00007f2b9d476e05 in -[CardElement description] (self=0x7f2ba88c3e80, _cmd=0x7f2b9d6a07b0) at CardElement.m:421
str = 0x7f2baa2605b0
0000012 0x00007f2b9d478f2c in -[CardGroup description] (self=0x7f2ba88b6090, _cmd=0x7f2b9d6a07b0) at CardGroup.m:413
str = 0x7f2baa25f0b0
count = 5
0000013 0x00007f2b9d478f2c in -[CardGroup description] (self=0x7f2ba6529fb0, _cmd=0x7f2b9bd0d420) at CardGroup.m:413
str = 0x7f2baa1ed9a0
count = 8
max = 12
0000014 0x00007f2b9b854277 in _NSPrintForDebugger () from /usr/lib/libgnustep-base.so.1.22
No symbol table info available.
0000015 0x00007f2b9e5e6f50 in __objc_exec_class@plt ()
No symbol table info available.
0000016 0x00007f2b9d69cb00 in _OBJC_METH_VAR_TYPE_6 () from /usr/lib/libNGCards.so.4.9
No symbol table info available.
0000017 0x0000000002400050 in ?? ()
No symbol table info available.
0000018 0x00007ffff13e1b90 in ?? ()
No symbol table info available.
0000019 0x0000001200000001 in ?? ()
No symbol table info available.
0000020 0x0000000002400000 in ?? ()
No symbol table info available.
0000021 0x00007f2bb5f92160 in ?? ()
No symbol table info available.
0000022 0x0000000000003fc9 in ?? ()
No symbol table info available.
0000023 0x0000000000000001 in ?? ()
No symbol table info available.
0000024 0x00007ffff13e1c00 in ?? ()
No symbol table info available.
0000025 0x47aefcf5f1d7c800 in ?? ()
No symbol table info available.
0000026 0x0000000000000017 in ?? ()
No symbol table info available.
0000027 0x00007f2b9d69d4a0 in ?? () from /usr/lib/libNGCards.so.4.9
No symbol table info available.
0000028 0x00007f2b9bce7200 in ?? () from /usr/lib/libgnustep-base.so.1.22
No symbol table info available.
0000029 0x00000000017fe03f in ?? ()
No symbol table info available.
0000030 0x00007f2b5e414fdb in ?? ()
No symbol table info available.
0000031 0x00007f2b5fc13017 in ?? ()
....

When we look NSString+NGCards.m at ligne 160 we find something strange :

string = [self stringByReplacingString: @"\"
withString: @"\\"];

When we do a
(gbb) po 0x7f2bbbf922d0
"(UTC+01:00) Brussels\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\......"

Probably a bug with an infinite loop ?

Any suggestion ?

Best Regards,
Ludovic.

TagsNo tags attached.

Activities

Ludovic Hutin

Ludovic Hutin

2013-06-14 14:33

reporter   ~0005649

I think, when we look the source code, there is a remplacement of \ into a \\

When you have a recurrent event, en when you edit the event, the filter is apply again so \\ is remplace to \\\\
Etc...

We got many event who go this string "\\\\" on it

ludovic

ludovic

2013-06-14 17:44

administrator   ~0005650

Can you try a patch?

ludovic

ludovic

2013-06-14 18:59

administrator   ~0005651

Fix pushed: https://github.com/inverse-inc/sogo/commit/f25344182debb14001c39db452374f138cd0ee8b

Issue History

Date Modified Username Field Change
2013-06-14 14:24 Ludovic Hutin New Issue
2013-06-14 14:33 Ludovic Hutin Note Added: 0005649
2013-06-14 17:44 ludovic Note Added: 0005650
2013-06-14 18:59 ludovic Target Version => 2.0.6
2013-06-14 18:59 ludovic Note Added: 0005651
2013-06-14 18:59 ludovic Status new => closed
2013-06-14 18:59 ludovic Resolution open => fixed
2013-06-14 18:59 ludovic Fixed in Version => 2.0.6