From owner-freebsd-stable@freebsd.org Tue Apr 14 22:55:23 2020 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4F4342CC13D for ; Tue, 14 Apr 2020 22:55:23 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from nsstlmta18p.bpe.bigpond.com (nsstlmta18p.bpe.bigpond.com [203.38.21.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "", Issuer "Openwave Messaging Inc." (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 49216J1m6Lz3Qck for ; Tue, 14 Apr 2020 22:55:19 +0000 (UTC) (envelope-from areilly@bigpond.net.au) Received: from smtp.telstra.com ([10.10.24.4]) by nsstlfep18p-svc.bpe.nexus.telstra.com.au with ESMTP id <20200414225514.FHBL11751.nsstlfep18p-svc.bpe.nexus.telstra.com.au@smtp.telstra.com> for ; Wed, 15 Apr 2020 08:55:14 +1000 X-RG-Spam: Unknown X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduhedrfedvgdduvdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfupfevtfgpvffgnffuvffttedpqfgfvfenuceurghilhhouhhtmecugedttdenucenucfjughrpefhtggguffffhfvjgfkofesrgdtmherhhdtvdenucfhrhhomheptehnughrvgifucftvghilhhlhicuoegrrhgvihhllhihsegsihhgphhonhgurdhnvghtrdgruheqnecuffhomhgrihhnpegsihhgphhonhgurdgtohhmpdhtvghlshhtrhgrrdgtohhmpdhfrhgvvggsshgurdhorhhgnecukfhppeeitddrvddvjedrvddvtddrudehkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopegluddtrddtrddtrdeingdpihhnvghtpeeitddrvddvjedrvddvtddrudehkedpmhgrihhlfhhrohhmpeeorghrvghilhhlhiessghighhpohhnugdrnhgvthdrrghuqedprhgtphhtthhopeeofhhrvggvsghsugdqshhtrggslhgvsehfrhgvvggsshgurdhorhhgqe X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean X-RG-VS-CLASS: clean X-Authentication-Info: Submitted using ID areilly@bigpond.net.au Received: from [10.0.0.6] (60.227.220.158) by smtp.telstra.com (5.8.420) (authenticated as areilly@bigpond.net.au) id 5E7BBFAF07A90B04 for freebsd-stable@freebsd.org; Wed, 15 Apr 2020 08:55:14 +1000 From: Andrew Reilly Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: Curl giving (27) Out of memory error where it didn't before Date: Wed, 15 Apr 2020 08:55:12 +1000 References: <93AF62DD-3638-4326-BDAC-0054793FAB07@bigpond.net.au> To: freebsd-stable@freebsd.org In-Reply-To: <93AF62DD-3638-4326-BDAC-0054793FAB07@bigpond.net.au> Message-Id: <446EDF4B-E736-4297-A132-C67EEC682785@bigpond.net.au> X-Mailer: Apple Mail (2.3608.80.23.2.2) X-Rspamd-Queue-Id: 49216J1m6Lz3Qck X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=bigpond.net.au; spf=pass (mx1.freebsd.org: domain of areilly@bigpond.net.au designates 203.38.21.18 as permitted sender) smtp.mailfrom=areilly@bigpond.net.au X-Spamd-Result: default: False [-2.40 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:203.38.21.0/24]; FREEMAIL_FROM(0.00)[bigpond.net.au]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; TO_DN_NONE(0.00)[]; IP_SCORE_FREEMAIL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DMARC_POLICY_ALLOW(-0.50)[bigpond.net.au,none]; MV_CASE(0.50)[]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[18.21.38.203.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[bigpond.net.au]; ASN(0.00)[asn:1221, ipnet:203.36.0.0/14, country:AU]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ipnet: 203.36.0.0/14(-4.08), asn: 1221(-2.68), country: AU(0.01)]; RECEIVED_SPAMHAUS_PBL(0.00)[158.220.227.60.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Apr 2020 22:55:23 -0000 Bother. Password leaked. Password changed. Thanks for the warning! Cheers, Andrew Reilly M: 0409-824-272 areilly@bigpond.net.au > On 15 Apr 2020, at 07:35 , Andrew Reilly = wrote: >=20 > Hi there, >=20 > I have a cron job that is supposed to email me at a backup email = account if my ISP ever changes my IP address. It doesn't happen very = often, but it happened again this morning, and I was disappointed to = find that the script that does the notification failed. >=20 > Sending e-mail in this way requires SSL connection to my ISP's mail = server (smtp.bigpond.com) and authentication, and I was pleased to = discover, a while back, that curl can handle both of those details, as = well as sending email. So I use this script (edited to elide passwords = and addresses): > email-myself.sh: > #!/bin/sh > /usr/local/bin/curl -v -T- --ssl-reqd smtps://smtp.bigpond.com = --mail-from areilly@bigpond.net.au --mail-rcpt backup_address@me.com = --mail-auth areilly@bigpond.net.au --user = areilly@bigpond.net.au:password < From: Andrew Reilly > To: Andrew Reilly > Subject: $1 > Date: $(date -R) >=20 > $2 > END >=20 > As I said, previously that has worked perfectly, but today I'm getting = the following in my logs (thanks to having verbose output turned on): >=20 > % Total % Received % Xferd Average Speed Time Time Time = Current > Dload Upload Total Spent Left = Speed > 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 = --:--:-- 0* Trying 203.36.137.240:465... > * Connected to smtp.bigpond.com (203.36.137.240) port 465 (#0) > * successfully set certificate verify locations: > * CAfile: /usr/local/share/certs/ca-root-nss.crt > CApath: none > } [5 bytes data] > * TLSv1.3 (OUT), TLS handshake, Client hello (1): > } [512 bytes data] > * TLSv1.3 (IN), TLS handshake, Server hello (2): > { [91 bytes data] > * TLSv1.2 (IN), TLS handshake, Certificate (11): > { [4836 bytes data] > * TLSv1.2 (IN), TLS handshake, Server key exchange (12): > { [333 bytes data] > * TLSv1.2 (IN), TLS handshake, Server finished (14): > { [4 bytes data] > * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): > } [70 bytes data] > * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): > } [1 bytes data] > * TLSv1.2 (OUT), TLS handshake, Finished (20): > } [16 bytes data] > * TLSv1.2 (IN), TLS handshake, Finished (20): > { [16 bytes data] > * SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 > * Server certificate: > * subject: C=3DAU; ST=3DVictoria; L=3DMelbourne; O=3DTelstra = Corporation Limited; OU=3DTechnology Product Ownership CH10; = CN=3Dmail.bigpond.com > * start date: Jan 23 03:57:06 2020 GMT > * expire date: Jan 23 04:07:00 2022 GMT > * subjectAltName: host "smtp.bigpond.com" matched cert's = "smtp.bigpond.com" > * issuer: C=3DBM; O=3DQuoVadis Limited; CN=3DQuoVadis Global SSL ICA = G2 > * SSL certificate verify ok. > { [5 bytes data] > < 220 smtp.telstra.com ESMTP Service ready > } [5 bytes data] >> EHLO Zen > { [5 bytes data] > < 250-smtp.telstra.com > < 250-8BITMIME > < 250-PIPELINING > < 250-HELP > < 250-AUTH=3DLOGIN > < 250-AUTH LOGIN PLAIN > < 250-DELIVERBY 300 > < 250 SIZE 30000000 > } [5 bytes data] >> AUTH PLAIN > { [5 bytes data] > < 334 ? > } [5 bytes data] >> AGFyZWlsbHlAYmlncG9uZC5uZXQuYXUARnJhaGFuMHc=3D > { [5 bytes data] > < 235 PLAIN authentication successful > 0 0 0 0 0 0 0 0 --:--:-- 0:00:05 = --:--:-- 0 > } [5 bytes data] >> QUIT > { [5 bytes data] > < 221 smtp.telstra.com QUIT > * Closing connection 0 > } [5 bytes data] > * TLSv1.2 (OUT), TLS alert, close notify (256): > } [2 bytes data] > curl: (27) Out of memory >=20 > That looks to me as though the SSL setup worked fine, then the AUTH = fine, then the message transfer all fine, and quitting too. So = everything was fine, but then curl crashed with error 27 "out of = memory", and I haven't received any messages. >=20 > The web thinks that the two most likely ways for an out-of-date shared = library linkage or a not-thread-safe programming bug. So I used = portmaster -f to rebuild curl and all its dependencies, and it still = crashes exactly as shown. >=20 > The computer in question is running: (uname -a) > FreeBSD Zen.local 12.1-STABLE FreeBSD 12.1-STABLE r359760 GENERIC = amd64 >=20 > and has 32G of RAM and eight two-thread AMD 1700 cores. >=20 > Any suggestions? >=20 > Andrew Reilly > M: 0409-824-272 > areilly@bigpond.net.au >=20 >=20 >=20 > _______________________________________________ > freebsd-stable@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to = "freebsd-stable-unsubscribe@freebsd.org"