From owner-freebsd-questions@freebsd.org Thu Jan 28 14:11:02 2016 Return-Path: Delivered-To: freebsd-questions@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 CB33CA6FDF7 for ; Thu, 28 Jan 2016 14:11:02 +0000 (UTC) (envelope-from efimyury@gmail.com) Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) (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 934B8176B for ; Thu, 28 Jan 2016 14:11:02 +0000 (UTC) (envelope-from efimyury@gmail.com) Received: by mail-yk0-x22d.google.com with SMTP id y137so31434508yka.2 for ; Thu, 28 Jan 2016 06:11:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=user-agent:from:to:subject:date:message-id:mime-version :content-type; bh=P0i2Ru1ioYKxFL453umNqyFEPfa8ALp4EQO9fSzrt30=; b=K7M5+RsY5d1FwlRRmBAN6Q6PBCUN8XvZkqPqKqLvhfEfaNdUe3EJiuKiSzszD/xapf aBaO+eVcLBG3NBtIndnjkOG86ZCJ+CHttF7Q5GyUbqUTuRzAm/ZcR1D9pLeRJneU3XsG vgurBHzEZDkWKdh+gSW78nbwK46lwh+mwC/CcILJsMEbRzK6T4H/oUsYzndi6O0ydB6L sz1O3outrg6mvwsBPiECvinA9MlM4FsaTyWEcvsa7RGwj2aLwvnijt4iMS7dSn64T5Nt BqT4XMZeGADXUmxqIJbEtfSAObPdbc+se5l+YqUVUnbFTU7Pjlrf7cO4S/tvxM2zgf0W v2lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version:content-type; bh=P0i2Ru1ioYKxFL453umNqyFEPfa8ALp4EQO9fSzrt30=; b=UiXxDG7xiaxIw19gcDj6KhlFLsVlIHXMod0fxqHFx8W4YNG119zC8eeZBNe/HQ7mre j6F1N3FAQCdfHJ9fRUD+Tw947fkBcKS/qq6mtte5AkCWVq4yZbhAzGIyGmb0MCIUdJhJ zGzzRg1VMJI9E2yl2hdbyA5ABNf84LqNn8lyqFbG7L4gcb93+k6GBMcgtbxFyPMNIF8F MKG0PjVoLN8mfL2A4VetrVr/UhhfCO7FRBQWpd1qCxU/8kZQYMwhXbxpWM7N9fDsccss LMpCMygcjxly8zUhtJd3EuG15RZfYNq8kLw6Koc0vJmvwC9xJPKfoVAxJR54cdO9WELL Qeew== X-Gm-Message-State: AG10YORzol21y5FPlwlBFhtzu1ei9ULUV3B5KimfSF+XeGq/GRFJGlujbeLeQ3agbSSt4g== X-Received: by 10.37.25.193 with SMTP id 184mr1680666ybz.47.1453990261551; Thu, 28 Jan 2016 06:11:01 -0800 (PST) Received: from localhost.localdomain ([128.140.241.11]) by smtp.gmail.com with ESMTPSA id q141sm4723798ywg.2.2016.01.28.06.11.00 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jan 2016 06:11:01 -0800 (PST) User-agent: mu4e 0.9.15; emacs 24.5.1 From: Yury Efimochev To: freebsd-questions@freebsd.org Subject: malloc problems Date: Thu, 28 Jan 2016 17:10:57 +0300 Message-ID: <87wpqtlrpq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Jan 2016 14:11:02 -0000 Hi, After update from 9.2-RELEASE-p17 to 9.3-RELEASE-p24 on our production server our service started crashing with 'segmentation fault/bus error' on regular basis(roughly once a days). Investigation revealed that crashes were caused by the fact that under certain circumstances malloc may return pointer on same memory for multiple clients from different threads. We suggested that our problem caused by thread-specific cache, so we disabled it(by adding 'MALLOC_OPTIONS=7h' to our service environment). That fixed crashes, but caused 10-100 'std::bad_alloc' exceptions every day(no 'std::bad_alloc' exceptions before that for months). Does anyone faced similar issues? -- Best regards, Yury Efimochev