Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 683274 - kde-apps/korganizer - korgac crashes when using a google calendar
Summary: kde-apps/korganizer - korgac crashes when using a google calendar
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard: fixed in kde-apps/akonadi-calendar-18...
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-04-14 05:28 UTC by manu
Modified: 2019-05-08 19:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
calend.patch (calend.patch,1.58 KB, patch)
2019-04-30 16:38 UTC, Giuseppe Vitillaro
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description manu 2019-04-14 05:28:09 UTC
Adding a google calendar in korganizer results in korgac (korganizer-related daemon) to crash every startup. Maybe related to this bug

https://bugs.gentoo.org/679764

though, the same version of libkgapi used to work fine before updating akonadi and related packages to version 18.12.3-r1.

My setup:

Portage 2.3.62 (python 3.6.5-final-0, default/linux/amd64/17.0/desktop/plasma/systemd, gcc-8.2.0, glibc-2.28-r6, 4.19.27-gentoo-r1 x86_64)
=================================================================
System uname: Linux-4.19.27-gentoo-r1-x86_64-Intel-R-_Core-TM-_i5-6600K_CPU_@_3.50GHz-with-gentoo-2.6
KiB Mem:    32900444 total,  27525372 free
KiB Swap:    1023996 total,   1023996 free
Timestamp of repository gentoo: Wed, 10 Apr 2019 06:45:01 +0000
Head commit of repository gentoo: 85a97a49b212176fa49d1d0c56b4f2d3068f273f
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
app-shells/bash:          4.4_p23-r1::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.9.6::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r4::gentoo
sys-devel/gcc:            6.4.0-r1::gentoo, 8.2.0-r6::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.28-r6::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.nl.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts: 

localmanu
    location: /usr/local/portage
    masters: gentoo

maggu2810-overlay
    location: /var/lib/layman/maggu2810-overlay
    masters: gentoo
    priority: 50

nest
    location: /var/lib/layman/nest
    masters: gentoo
    priority: 50

steam-overlay
    location: /var/lib/layman/steam-overlay
    masters: gentoo
    priority: 50

torbrowser
    location: /var/lib/layman/torbrowser
    masters: gentoo
    priority: 50

wjn-overlay
    location: /var/lib/layman/wjn-overlay
    masters: gentoo
    priority: 50

Installed sets: @cuda-nvidia-for-tensorflow
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/easy-rsa /usr/share/gnupg/qualified.txt /usr/share/maven-bin-3.3/conf"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=native -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.free.fr/mirrors/ftp.gentoo.org/ rsync://mirror.eu.oneandone.net/gentoo/ rsync://rsync.mirrorservice.org/distfiles.gentoo.org/"
LANG="es_ES.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="es es_ES"
MAKEOPTS="-j4"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X a52 aac acl acpi activities alsa amd64 berkdb bluetooth branding bzip2 cairo cdda cdr cli corefonts crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode epub exif fam fat flac fortran gdbm gif glamor gpm gtk iconv icu ipv6 java jpeg kde kipi kwallet lcms ldap libass libnotify libtirpc linguas_es lirc mad matroska mng mp3 mp4 mpeg mtp multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt5 readline scanner sdl seccomp semantic-desktop spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb uxa vdpau vorbis widgets wxwidgets x264 xattr xcb xcomposite xml xv xvid xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" L10N="es es-ES es_ES" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LIRC_DEVICES="devinput" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby24" SANE_BACKENDS="hp hp3500 hp3900 hp4200 hp5400 hp5590 hpljm1005 hpsj5s hs2p" USERLAND="GNU" VIDEO_CARDS="intel i965 nvidia nouveau" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Sergey Okhapkin 2019-04-18 20:05:46 UTC
I'm having exactly the same problem after upgrading to -r1 version.
Comment 2 Sergey Okhapkin 2019-04-20 22:13:11 UTC
I disabled akonadi-18.12.3-major-regression-updating-attributes.patch and akonadi-18.12.3-collection-detach-at-wrong-time-in-attribute.patch, rebuilt affected packages and no more crashes.
Comment 3 Giuseppe Vitillaro 2019-04-30 16:38:06 UTC
Created attachment 574850 [details, diff]
calend.patch

diff -u user patch
Comment 4 Giuseppe Vitillaro 2019-04-30 16:48:56 UTC
Comment on attachment 574850 [details, diff]
calend.patch

Well same problem, /usr/bin/korgac, from the just emerged package kde-apps/korganizer-18.12.3-r1, crashes episodically, sometime it does, sometime it doesn't, with googlecalendar plugin active.

I traced down the problem with gdb to this SEGV:

Thread 1 "korgac" received signal SIGSEGV, Segmentation fault.
0x00007ffff72d30c9 in Akonadi::BlockAlarmsAttribute::isAlarmTypeBlocked(KCalCore::Alarm::Type) const () from /usr/lib64/libKF5AkonadiCalendar.so.5

which seems to point to the package kde-apps/akonadi-calendar-18.12.3-r1 source file src/etmcalendar.cpp.

The same problem is referenced upstream in this thread:

https://bugs.kde.org/show_bug.cgi?id=406411

apparently solved in version 19.

Trying to solve the problem in the current gentoo version, I did some hacking using the updated git source file of etmcalendar.cpp https://github.com/KDE/akonadi-calendar/blob/master/src/etmcalendar.cpp, creating, with a "diff -u", the attached user patch.

It seems, at least, enough to keep korgac alive, meanwhile we wait for the 19 version.

I hope it may helps to track the real BUG.
Comment 5 Andreas Sturmlechner gentoo-dev 2019-05-01 11:24:08 UTC
Thanks for digging this out, please test the following commit:

https://cgit.kde.org/akonadi-calendar.git/commit/?h=Applications/19.04&id=c9129b07b42097f6b5eb54c2103d22a9c2263d83
Comment 6 Giuseppe Vitillaro 2019-05-02 09:11:23 UTC
(In reply to Andreas Sturmlechner from comment #5)
> Thanks for digging this out, please test the following commit:
> 
> https://cgit.kde.org/akonadi-calendar.git/commit/?h=Applications/19.
> 04&id=c9129b07b42097f6b5eb54c2103d22a9c2263d83

Yep, it works, I just tested the patch and it works nicely, korgac doesn't crash anymore.

And I hope, thanks to this patch, I understood the semantic of this bug.

It is, I guess, what happens when a programmer forget to think to the machine code a compiler generates and only watch to the estetical shape of source code.

This fragment of code:

int a = 1234;
{
  int b = 5678;
}
int c;
printf ( "%p %d\n", &c, c);

where the last printf statement is going to print "5678" because "c" it has been allocated on the same stack address of "b", should point to the very same mistake we have seen corrected by this patch.

The source code doesn't look nice as:

int a = 1234;
int b = 5678;
{
}
int c;

but the semantic is wrong and the compiler generates the wrong code.

Thanks so much. I guess we may consider FIXED this BUG.
Comment 7 Andreas Sturmlechner gentoo-dev 2019-05-02 09:19:24 UTC
Thanks for testing.
Comment 8 Larry the Git Cow gentoo-dev 2019-05-08 17:05:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=452f0a5dabfd4578e6d21867f486aad51d11b15a

commit 452f0a5dabfd4578e6d21867f486aad51d11b15a
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-05-01 11:36:50 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-05-08 16:59:30 +0000

    kde-apps/akonadi-calendar: Fix korgac crash
    
    KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=406411
    Bug: https://bugs.gentoo.org/683274
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 .../akonadi-calendar-18.12.3-r2.ebuild             | 48 ++++++++++++++++++++++
 .../akonadi-calendar-18.12.3-korgac-crash.patch    | 46 +++++++++++++++++++++
 2 files changed, 94 insertions(+)