From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30107 invoked by alias); 24 Jun 2010 17:30:12 -0000 Received: (qmail 30087 invoked by uid 22791); 24 Jun 2010 17:30:10 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 Jun 2010 17:30:04 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5OHU3Fm023214 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 24 Jun 2010 13:30:03 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5OHU0a3000539 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 24 Jun 2010 13:30:02 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o5OHU0dw010847 for ; Thu, 24 Jun 2010 19:30:00 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o5OHTxYn010846 for gdb-patches@sourceware.org; Thu, 24 Jun 2010 19:29:59 +0200 Date: Thu, 24 Jun 2010 17:30:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] GDB regression for starting on r/o filesystem Message-ID: <20100624172959.GA10631@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00537.txt.bz2 Hi, currently if you have readonly/broken/full /tmp GDB will fail to start: Cannot create temporary file in ./: Read-only file system due to: #0 raise () from /lib64/libc.so.6 #1 abort () from /lib64/libc.so.6 #2 make_temp_file (suffix="") at ./make-temp-file.c:205 #3 temp_file (obj=, flags=10, name=) at ./pex-common.c:109 #4 pex_run_in_environment (obj=, flags=10, executable="iconv", argv=, env=, orig_outname=, errname=, err=) at ./pex-common.c:232 #5 find_charset_names () at charset.c:803 #6 _initialize_charset () at charset.c:915 #7 initialize_all_files () at init.c:380 #8 gdb_init (argv0="/root/gdb-clean") at top.c:1670 #9 captured_main (data=) at ./main.c:657 #10 catch_errors (func=, func_args=, errstring="", mask=6) at exceptions.c:518 #11 gdb_main (args=) at ./main.c:945 #12 main (argc=1, argv=) at gdb.c:34 Tom suggested PEX_USE_PIPES at https://bugzilla.redhat.com/show_bug.cgi?id=602644 @item PEX_USE_PIPES Use pipes for communication between processes, if possible. I see ser-mingw.c is already using it: ps->pex = pex_init (PEX_USE_PIPES, "target remote pipe", NULL); It should be safe across platforms: /* DJGPP does not support pipes. */ flags &= ~ PEX_USE_PIPES; And it starts to start on readonly filesystem again. No regressions on {x86_64,x86_64-m32,i686}-fedora13-linux-gnu. Thanks, Jan 2010-06-24 Jan Kratochvil Tom Tromey Fix GDB startup on readonly filesystem. * charset.c (find_charset_names): Use PEX_USE_PIPES for pex_init. --- a/gdb/charset.c +++ b/gdb/charset.c @@ -794,7 +794,7 @@ find_charset_names (void) set_in_environ (iconv_env, "LANGUAGE", "C"); set_in_environ (iconv_env, "LC_ALL", "C"); - child = pex_init (0, "iconv", NULL); + child = pex_init (PEX_USE_PIPES, "iconv", NULL); args[0] = "iconv"; args[1] = "-l";