From owner-freebsd-ports@freebsd.org Fri Feb 9 08:33:05 2018 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2405DF0FA12 for ; Fri, 9 Feb 2018 08:33:05 +0000 (UTC) (envelope-from joris.dedieu@gmail.com) Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B8DE87830A; Fri, 9 Feb 2018 08:33:04 +0000 (UTC) (envelope-from joris.dedieu@gmail.com) Received: by mail-it0-x22a.google.com with SMTP id k6so9798758ita.3; Fri, 09 Feb 2018 00:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=TLGiQcciyPxModJo4gmey8CvpqDfri3u6TQ4I5Qq0Tc=; b=dp7pFjKsXfwAFijRougmNodyG7+RwOIeSBbJVmXrMySHEw8THEeGDbzPXUHkhV1Id5 C8FSPaRz1eTYV2E/BtaxDBmzbVqS021JPE/k38WMpS6ouF/wKd87XbWWKCdF9bTh7fPu KaafrnMdh/q11wGyk0vYy5k9TNO5Q5rvLrGNal1+oaWSsg4uBM116oT4OiQqtIZzx6dH 03DYpGvxrDM03Glre2VQvClsP8wt3iQvZvufR2+0tPyqjytQzbWUfIanaxijz8j4tK4/ dqwjCWAmQnDnfK9e9TwV3faFHXA/MFjRcCuDDVEv7tDHoEASJWNu9PGXTNjxkstmlB/7 HeWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=TLGiQcciyPxModJo4gmey8CvpqDfri3u6TQ4I5Qq0Tc=; b=OThdEXnOUtZMmxWxTbvBBW2ytJR5wSZSd84OgfdBjVyHXJ5g0S5Ouj+ZYTN0DDI5OL s3IEzAGVu9K1+E5RFVKZ5IpoAigtMRLI5mI+/n4WsM/OKvktonfT14S6i6nhGlUm9gPh lx9WRTT84z/cFqwS/coZYHwLMprNnJt/Uyfk6f3HYNyMl3+tjSc9zS2umvW5JhR79jUB UU9v4RCc0NxmR4SJVr/ZpxpVMgCGBwlsIY4lryr6C0Y9ri1gjjeEGpP9GuLjlwytf2q/ 24tHIJI/Es2MM7P74N3L4SWF4azQdEJOmUW4hpna4jU+5Po/7vvrVvV/PeJKUa0hdvpc 9AHQ== X-Gm-Message-State: APf1xPC9viUAo1Pgqd8n5FOspol/tR1hBTSTcrXk7CylCjezASWHwSaD LCkkUT0mXVAAYBuvoYHvJrN5hm5TO5vjpm64Zz0eP+lg X-Google-Smtp-Source: AH8x224zHaQp/gnXJFhoziMBAW3Kqyo93FeT9unIfDR+9Hst+IIDgJ3tv6Ptqowp0uTLTFObQVW/WlWhStn/dAD3uF0= X-Received: by 10.36.225.72 with SMTP id n69mr2602757ith.114.1518165183581; Fri, 09 Feb 2018 00:33:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.226.9 with HTTP; Fri, 9 Feb 2018 00:33:03 -0800 (PST) From: joris dedieu Date: Fri, 9 Feb 2018 09:33:03 +0100 Message-ID: Subject: openldap-server exit on signal 6 on 11.1 (and not in 10.3) To: freebsd-ports Cc: delphij@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Feb 2018 08:33:05 -0000 Dear porters, While moving from 10.3 to 11.1, I get an issue on openldap execution. slapd dies (pid 29087 (slapd), uid 389: exited on signal 6) on some complex but reproducible operations. We worked around this bug by returning less elements from the request. While my dear colleges are trying to write a script to reproduce the issue, I investigate system side. In /var/log/messages, I got slapd[4909]: stack overflow detected; terminated The only trace I get #0 0x0000000801f7a71a in kill () from /lib/libc.so.7 #1 0x0000000801f7a6d0 in __stack_chk_fail () from /lib/libc.so.7 #2 0x0000000801f7a640 in __stack_chk_fail () from /lib/libc.so.7 #3 0x00000000004466e6 in do_modify () #4 0x00000000004308d5 in connection_assign_nextid () #5 0x00000000004300dd in connection_read_activate () #6 0x0000000800956ffa in ldap_pvt_thread_pool_submit () from /usr/local/lib/libldap_r-2.4.so.2 #7 0x0000000801c71bc5 in pthread_create () from /lib/libthr.so.3 #8 0x0000000000000000 in ?? () I suspect it's relative to -fstack-protector-strong which is the default since FreeBSD 11.0. Do you think I should rebuild all the world this opion ? I also thought on fdatasync .if ${OSVERSION} < 1101000 CFLAGS+= -DMDB_DSYNC=O_SYNC -Dfdatasync=fsync .endif I'm currently investigating on this changes. The issue disappear when slapd is compiled with debugging symbols (WITH_DEBUG=YES). As far as I understand, this only cause -g flag to be added to CFLAGS. Does WITH_DEBUG also disable some compiler optimization ? Any thought on all this is welcomed Joris Openldap options : Name : openldap-sasl-server Version : 2.4.45_4 Installed on : Thu Feb 8 16:16:45 2018 CET Origin : net/openldap24-server Architecture : FreeBSD:11:amd64 Prefix : /usr/local Categories : databases net Licenses : OPENLDAP Maintainer : delphij@FreeBSD.org WWW : http://www.OpenLDAP.org/ Comment : Open source LDAP server implementation Options : ACCESSLOG : on ACI : off AUDITLOG : off BDB : off COLLECT : off CONSTRAINT : off DDS : off DEBUG : off DEREF : off DNSSRV : off DYNACL : off DYNAMIC_BACKENDS: on DYNGROUP : off DYNLIST : off FETCH : off GSSAPI : on KQUEUE : off LASTBIND : off LMPASSWD : off MDB : on MEMBEROF : off ODBC : off OUTLOOK : off PASSWD : off PERL : off PPOLICY : on PROXYCACHE : off REFINT : off RELAY : off RETCODE : off RLOOKUPS : off RWM : off SASL : on SEQMOD : off SHA2 : off SHELL : off SLAPI : off SLP : off SMBPWD : off SOCK : off SSSVLV : off SYNCPROV : on TCP_WRAPPERS : off TRANSLUCENT : off UNIQUE : off VALSORT : off