From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: MICHAEL J MCCLENNEN Newsgroups: gmane.emacs.bugs Subject: bug#23883: 24.4.51; tramp sometimes reports "Args out of range" error when resuming editing a remote file after a period of inactivity Date: Sat, 02 Jul 2016 01:55:21 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII Content-Transfer-Encoding: 7BIT X-Trace: ger.gmane.org 1467428433 22994 80.91.229.3 (2 Jul 2016 03:00:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 2 Jul 2016 03:00:33 +0000 (UTC) To: 23883@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 02 05:00:20 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bJBAI-0003iw-JX for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Jul 2016 05:00:18 +0200 Original-Received: from localhost ([::1]:36724 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJBAE-0004BH-K6 for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jul 2016 23:00:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJBA8-00049U-5j for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 23:00:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJBA3-0000ve-0G for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 23:00:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50192) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJBA2-0000vY-TW for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 23:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bJBA2-0006HO-D2 for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 23:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: MICHAEL J MCCLENNEN Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jul 2016 03:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23883 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: "bug-gnu-emacs@gnu.org" Original-Received: via spool by submit@debbugs.gnu.org id=B.146742835924058 (code B ref -1); Sat, 02 Jul 2016 03:00:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Jul 2016 02:59:19 +0000 Original-Received: from localhost ([127.0.0.1]:34296 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJB9L-0006Fx-6G for submit@debbugs.gnu.org; Fri, 01 Jul 2016 22:59:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bJA9i-0003D3-V7 for submit@debbugs.gnu.org; Fri, 01 Jul 2016 21:55:39 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJA9c-00033u-Co for submit@debbugs.gnu.org; Fri, 01 Jul 2016 21:55:33 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57034) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJA9c-00033X-28 for submit@debbugs.gnu.org; Fri, 01 Jul 2016 21:55:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJA9Z-0005nU-KW for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 21:55:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bJA9W-00032n-Hj for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 21:55:29 -0400 Original-Received: from wmauth2.doit.wisc.edu ([144.92.197.222]:62729 helo=smtpauth2.wiscmail.wisc.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bJA9W-00032W-BJ for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 21:55:26 -0400 Original-Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7.0.5.37.0 64bit (built Jan 25 2016)) id <0O9N00K00ZHB3G00@smtpauth2.wiscmail.wisc.edu> for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 20:55:23 -0500 (CDT) Original-Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01lp0115.outbound.protection.outlook.com [207.46.163.115]) by smtpauth2.wiscmail.wisc.edu (Oracle Communications Messaging Server 7.0.5.37.0 64bit (built Jan 25 2016)) with ESMTPS id <0O9O00HKW00A8Y20@smtpauth2.wiscmail.wisc.edu> for bug-gnu-emacs@gnu.org; Fri, 01 Jul 2016 20:55:23 -0500 (CDT) Original-Received: from CY1PR06MB2105.namprd06.prod.outlook.com (10.166.193.18) by CY1PR06MB2106.namprd06.prod.outlook.com (10.166.193.19) with Microsoft SMTP Server (TLS) id 15.1.523.12; Sat, 2 Jul 2016 01:55:21 +0000 Original-Received: from CY1PR06MB2105.namprd06.prod.outlook.com ([10.166.193.18]) by CY1PR06MB2105.namprd06.prod.outlook.com ([10.166.193.18]) with mapi id 15.01.0523.025; Sat, 2 Jul 2016 01:55:21 +0000 Thread-topic: 24.4.51; tramp sometimes reports "Args out of range" error when resuming editing a remote file after a period of inactivity Thread-index: AQHR1ATKeveAPSFNkUu4uyiEK66Rjg== Accept-Language: en-US Content-language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Authentication-results: spf=none (sender IP is ) smtp.mailfrom=mmcclenn@geology.wisc.edu; x-ms-exchange-messagesentrepresentingtype: 1 X-Originating-IP: [24.183.32.225] x-ms-office365-filtering-correlation-id: 4c46a4bf-0f70-4cf5-0093-08d3a21becff x-microsoft-exchange-diagnostics: 1; CY1PR06MB2106; 6:JWge1OQzAa2F1KrD751QV5HD+xoUNVcyZh8ayJlpi6+0HrUWtwYAPtvekzo+v98W7Ce4kGIh7/VBWqcBLLBWSeIvjUipim8Yp2RgH3W0y5EMC9P+ejRV9G+H3Q57wloFmXggQBw2JwwHLfkJl9l+QS7ThciuIADlhN3k85jVOqFMoHjxlRPT4MbAHidxZVSxGLLCz+esht3JtILVzFDZiUQMqXorQhRiZAHG+rGF8n5LbK/5cQqWK7DcgJU7yZ93mGmPL5jrzLTjWXJwk0WUqw1bdGTYOfF2T+q2jzL/Jjq8rQ+BRJiXyfFH/FAEpGakqlUAMccgR8JoYgYRj6za/MLw1RuwcYDtQWkdxAaHONo=; 5:yuENSKZdozIK3+xbx3kP742aGYRFb91saJj/HYVelTfh+srKc805jxar+NZJAlzLG6Kzc5Z32lZENed+u/G3trSZ/XW01+pZmKMm2e+O8RY0PqbbnLQ/CJ/u/O65DUcqNVcoUwO/BbJk8+sBJJhj+w==; 24:+87cMI3s/4Iy58ULF2XcnqfkuDM7vzR3KABAgJcm7uHkASC4QO2eb5mMLHKFyn3rKiMMKK5HuXLA2scWjQ5tyH0fZT4+QWElEFTqheeqxrM=; 7:MC0HlfRcUZR42/QqILE/BDWOnLMxXAWc6VmDr+IH5zDu1rcyGOfQdgVuYeguddLLtZ/bDRDHv+pymQvj6jVa3NWQWz+G0k8FeMx+zaCJmOOX4GC0Nesgs5T+1vs511K1JK3mrli8y8f1PynB9vgp+i0IsMR5sf5GqPjd6sP/01kruxMnzcx9H8/6FgqG39EiRQjv+UmPPeHks x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR06MB2106; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(20558992708506); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:CY1PR06MB2106; BCL:0; PCL:0; RULEID:; SRVR:CY1PR06MB2106; x-forefront-prvs: 0991CAB7B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(377424004)(189002)(5423002)(199003)(501624003)(2900100001)(77096005)(101416001)(8936002)(7846002)(86362001)(50986999)(7736002)(82746002)(305945005)(66066001)(54356999)(2906002)(68736007)(75432002)(92566002)(19580395003)(9686002)(2501003)(88552002)(99286002)(83716003)(3846002)(106356001)(106116001)(81166006)(8676002)(450100001)(6116002)(105586002)(189998001)(81156014)(97736004)(87936001)(10400500002)(586003)(33656002)(102836003)(107886002)(110136002)(229853001)(89122001)(5640700001)(5002640100001)(36756003)(11100500001)(2351001)(3660700001)(122556002)(3280700002)(104396002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR06MB2106; H:CY1PR06MB2105.namprd06.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:0; LANG:en; Received-SPF: None (protection.outlook.com: geology.wisc.edu does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-id: <5998A37D60BD694CB3FA329EF74351DE@namprd06.prod.outlook.com> X-OriginatorOrg: geology.wisc.edu X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Jul 2016 01:55:21.0831 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 2ca68321-0eda-4908-88b2-424a8cb4b0f9 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR06MB2106 X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Mailman-Approved-At: Fri, 01 Jul 2016 22:59:17 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120273 Archived-At: To reproduce this bug: 1) Edit a remote file using tramp. 2) Wait for at least 24 hours. 3) Make a change to the file in the local buffer. Emacs will then attempt to query the remote system using tramp in order to check whether it has changed on disk before allowing any local editing. 4) Sometimes (not always) this check aborts with the error message "Args out of range". The buffer is left in read-only mode, preventing you from working on the file. I have actually figured out where in the code the error occurs, and have a fix for it. The error occurs at the last line of the function `tramp-process-actions' in tramp.el, in the call to `delete-region'. The following patch will fix the problem: 3593c3593 < (let (buffer-read-only) (if (< pos (point)) (delete-region pos (point))))))))) --- > (let (buffer-read-only) (delete-region pos (point)))))))) I have tested this patch, and it solves the problem without causing any other problems that I can detect. I would appreciate if you would apply this patch to the Emacs source. In Aquamacs 3.2 GNU Emacs 24.4.51.2 (x86_64-apple-darwin14.0.0, NS apple-appkit-1343.14) of 2014-11-07 (Aquamacs-3.2) on watson.local Operating System: OS X Version 10.8.5 (Build 12F2560) Configured using: `configure --with-ns --without-x 'CFLAGS=-arch x86_64 -O3 -g -mtune=corei7 -mmacosx-version-min=10.6' 'LDFLAGS=-arch x86_64 -O3 -g -mtune=corei7 -mmacosx-version-min=10.6'' Important settings: locale-coding-system: utf-8-unix Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t savehist-mode: t smart-frame-positioning-mode: t shell-dirtrack-mode: t aquamacs-autoface-mode: t recentf-mode: t osx-key-mode: t tabbar-mwheel-mode: t tabbar-mode: t show-paren-mode: t delete-selection-mode: t cua-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Memory information: ((conses 16 866516 175475) (symbols 48 45081 0) (miscs 40 2907 3571) (strings 32 103591 20533) (string-bytes 1 4546451) (vectors 16 50097) (vector-slots 8 1858179 143262) (floats 8 1921 792) (intervals 56 167401 177) (buffers 960 779))