From owner-freebsd-current@freebsd.org Tue Jan 19 13:20:36 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 010BAA87BD8 for ; Tue, 19 Jan 2016 13:20:36 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED4914D2 for ; Tue, 19 Jan 2016 13:20:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA09734 for ; Tue, 19 Jan 2016 15:17:24 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1aLWA0-0004QW-6N for freebsd-current@FreeBSD.org; Tue, 19 Jan 2016 15:17:24 +0200 Subject: Re: environment corrupt; missing value for QT_IM_MO To: FreeBSD Current References: <5514E5B0.1030509@rawbw.com> <568B8291.50700@FreeBSD.org> <568B84DC.7080705@FreeBSD.org> From: Andriy Gapon X-Enigmail-Draft-Status: N1110 Message-ID: <569E3713.1060601@FreeBSD.org> Date: Tue, 19 Jan 2016 15:16:03 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <568B84DC.7080705@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2016 13:20:36 -0000 On 05/01/2016 10:54, Andriy Gapon wrote: > On 05/01/2016 10:45, Andriy Gapon wrote: >> >> Very weird, this suddenly started happening to me but with libreoffice. I can >> not correlate the problem with any actions / events. >> >> stderr: >> soffice.bin: environment corrupt; missing value for QT_IM_MO >> >> gdb: >> Core was generated by `soffice.bin'. >> Program terminated with signal SIGABRT, Aborted. >> #0 thr_kill () at thr_kill.S:3 >> 3 RSYSCALL(thr_kill) >> [Current thread is 2 (Thread 816615000 (LWP 102134))] >> (gdb) bt >> #0 thr_kill () at thr_kill.S:3 >> #1 0x0000000800dc5ddb in __raise (s=6) at /usr/src/lib/libc/gen/raise.c:52 >> #2 0x0000000800dc5d49 in abort () at /usr/src/lib/libc/stdlib/abort.c:65 >> #3 0x0000000805231318 in tools::extendApplicationEnvironment() () from >> /usr/local/lib/libreoffice/program/libtllo.so >> >> Smells like a possible bug in libc... > > Is there a limit on the environment's size? > QT_IM_MODULE is reported by ps as the last variable. I have taken another look at the problem and I've discovered that the affected variable is corrupted in a peculiar way: (kgdb) p environ[61] $23 = 0x7fffffffef45 "QT_IM_MO" (kgdb) x/s 0x7fffffffef45 0x7fffffffef45: "QT_IM_MO" (kgdb) x/s 0x7fffffffef4d 0x7fffffffef4d: "" (kgdb) x/s 0x7fffffffef4e 0x7fffffffef4e: "" (kgdb) x/s 0x7fffffffef4f 0x7fffffffef4f: "" (kgdb) x/s 0x7fffffffef50 0x7fffffffef50: "" (kgdb) x/s 0x7fffffffef51 0x7fffffffef51: "=xim" (kgdb) p environ[62] $42 = 0x0 So, it's "QT_IM_MODULE=xim" with 4 bytes (corresponding to "DULE") replaced with zeroes. This is 100% reproducible in my current environment, so it could be a deterministic write to a wrong offset. -- Andriy Gapon