From owner-freebsd-questions@FreeBSD.ORG Wed Mar 26 17:07:59 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C3B8902 for ; Wed, 26 Mar 2014 17:07:59 +0000 (UTC) Received: from eu1sys200aog112.obsmtp.com (eu1sys200aog112.obsmtp.com [207.126.144.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4F5CDCD for ; Wed, 26 Mar 2014 17:07:58 +0000 (UTC) Received: from mail-wg0-f49.google.com ([74.125.82.49]) (using TLSv1) by eu1sys200aob112.postini.com ([207.126.147.11]) with SMTP ID DSNKUzMJUvtWgYa/hzP7GpTLI0hYbQhIIs2E@postini.com; Wed, 26 Mar 2014 17:07:58 UTC Received: by mail-wg0-f49.google.com with SMTP id a1so1474707wgh.8 for ; Wed, 26 Mar 2014 10:07:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:message-id:to:subject:reply-to; bh=nqxxqNnog++x24wVrMW0If7Ion4KeIlq4Rh4+bO23B4=; b=CRlNNokO176fGbeNZ6LOJ24dpwydzSpN6Jy+sDxjH1UCT1HHr0kqkllyX/VxAM2/Yp hosE7zIeH88tZCk0aXEJ/aZskiAV18ck+xKYGQAQmaJMcu2cQ0GHGBwBbMZTDRx90iFA HYhpRlv6Or3hFbPaxMCU4/e59DaxbslcrcYFUMpf+tHhqv7tgHeiT+8jn54JcEwRiWs7 5Xa1vaE9luRjhPzz9jd2VCG7sg8oIfQgZAIU9grSfS0GFu4Dc0lK1pQ5R4AQr43gtcv6 i1HscMhHirsHF4DbsQCXl3IyKSEdhrsTc04FOLps1+T+YInpwAZYh5yY1iIArMJGgdSC sI3A== X-Gm-Message-State: ALoCoQnNqNrKatfj4JMNGfXkCd5/w4YVopDh3qI/dodgVX6GQK71DLCCqA3KgOJQIzqA0oQq4rVLHegPDX3ZXFh8V/x8NB3go/OeW4m6mPsgAxg9UoygTP9XqzGweEI8xigRhUwjXhI5OE77giwDD36K4Eump0IAW8l5QKfB1MgjNXYCF9cxOVltxE4w7nzsSuK6F8+s49vv X-Received: by 10.180.126.38 with SMTP id mv6mr31257164wib.46.1395853650665; Wed, 26 Mar 2014 10:07:30 -0700 (PDT) X-Received: by 10.180.126.38 with SMTP id mv6mr31257064wib.46.1395853649928; Wed, 26 Mar 2014 10:07:29 -0700 (PDT) Received: from mech-cluster241.men.bris.ac.uk (mech-cluster241.men.bris.ac.uk. [137.222.187.241]) by mx.google.com with ESMTPSA id t6sm4113376wix.4.2014.03.26.10.07.28 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Mar 2014 10:07:29 -0700 (PDT) Sender: Anton Shterenlikht Received: from mech-cluster241.men.bris.ac.uk (localhost [127.0.0.1]) by mech-cluster241.men.bris.ac.uk (8.14.8/8.14.6) with ESMTP id s2QH7RrM047717 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 26 Mar 2014 17:07:27 GMT (envelope-from mexas@mech-cluster241.men.bris.ac.uk) Received: (from mexas@localhost) by mech-cluster241.men.bris.ac.uk (8.14.8/8.14.6/Submit) id s2QH7RHm047716; Wed, 26 Mar 2014 17:07:27 GMT (envelope-from mexas) Date: Wed, 26 Mar 2014 10:07:29 -0700 (PDT) From: Anton Shterenlikht Message-Id: <201403261707.s2QH7RHm047716@mech-cluster241.men.bris.ac.uk> To: freebsd-questions@freebsd.org, freebsd-x11@freebsd.org Subject: glut stuck in glutCreateWindow() - help [WAS: Re: glut example executables: no window, no error, no exit] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: mexas@bris.ac.uk List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Mar 2014 17:07:59 -0000 >From mexas Wed Mar 26 14:30:30 2014 >To: freebsd-questions@freebsd.org, freebsd-x11@freebsd.org >Subject: glut example executables: no window, no error, no exit >Reply-To: mexas@bris.ac.uk > >The graphics/freeglut example don't >work on ia64 11-current. By that >I mean that none of the examples >seem to do anyting, e.g. > >$ /usr/local/share/examples/freeglut/callbackmaker > >sits doing nothing indefinitely: > >41596 0 I+ 0:00.03 /usr/local/share/examples/freeglut/callbackmaker > >It neither exits, nor aborts with any error. >No graphical window is open. > >I reported identical behaviour >for all mesa-demos executables: > >http://lists.freebsd.org/pipermail/freebsd-x11/2014-March/014395.html > >Can anybody please give a hint >on what might be going on? > >These demos in themselves are of >no interest to me. The real problem >is that science/paraview shows very >similar behaviour - doesn't open >graphical window, doesn't exit, >does't issue error. So I'm hoping >to get to the bottom of this issue. > >There are quite a lot of libs these >demos use: > >$ ldd /usr/local/share/examples/freeglut/callbackmaker >/usr/local/share/examples/freeglut/callbackmaker: > libglut.so.12 => /usr/local/lib/libglut.so.12 (0x120090000) > libm.so.5 => /lib/libm.so.5 (0x12010a000) > libusbhid.so.4 => /usr/lib/libusbhid.so.4 (0x12018a000) > libGL.so.1 => /usr/local/lib/libGL.so.1 (0x1201a0000) > libXi.so.6 => /usr/local/lib/libXi.so.6 (0x12033e000) > libXrandr.so.2 => /usr/local/lib/libXrandr.so.2 (0x120370000) > libXrender.so.1 => /usr/local/lib/libXrender.so.1 (0x120394000) > libXxf86vm.so.1 => /usr/local/lib/libXxf86vm.so.1 (0x1203b8000) > libXext.so.6 => /usr/local/lib/libXext.so.6 (0x1203d2000) > libX11.so.6 => /usr/local/lib/libX11.so.6 (0x120406000) > libxcb.so.2 => /usr/local/lib/libxcb.so.2 (0x12061c000) > libXau.so.6 => /usr/local/lib/libXau.so.6 (0x12065c000) > libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x120670000) > libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0 (0x120688000) > librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x12069a000) > libc.so.7 => /lib/libc.so.7 (0x1206b8000) > libXdamage.so.1 => /usr/local/lib/libXdamage.so.1 (0x12099a000) > libXfixes.so.3 => /usr/local/lib/libXfixes.so.3 (0x1209ae000) > libX11-xcb.so.1 => /usr/local/lib/libX11-xcb.so.1 (0x1209c8000) > libxcb-glx.so.0 => /usr/local/lib/libxcb-glx.so.0 (0x1209da000) > libxcb-dri2.so.0 => /usr/local/lib/libxcb-dri2.so.0 (0x120a0a000) > libdrm.so.2 => /usr/local/lib/libdrm.so.2 (0x120a20000) > libthr.so.3 => /lib/libthr.so.3 (0x120a46000) > >and I've no idea where to start looking. > >Many thanks > >Anton > > I've done some more debugging. Specifically I tried to build this simple opengl hello world code: https://github.com/jckarter/hello-gl Here's a fragment of the program: /* * Entry point */ int main(int argc, char** argv) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE); glutInitWindowSize(400, 300); fprintf(stderr, "chekpoint 1\n"); glutCreateWindow("Hello World"); fprintf(stderr, "chekpoint 2\n"); glutIdleFunc(&update_fade_factor); glutDisplayFunc(&render); glewInit(); if (!GLEW_VERSION_2_0) { fprintf(stderr, "OpenGL 2.0 not available\n"); return 1; } if (!make_resources()) { fprintf(stderr, "Failed to load resources\n"); return 1; } glutMainLoop(); return 0; } Note I added 2 checkpoints. When run, I get only to the first checkpoint: $ ./hello-gl-dummy chekpoint 1 ^C $ Then it gets stuck. When run in gdb, I get: TZAV> gdb ./hello-gl-dummy GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "ia64-marcel-freebsd"... (gdb) run Starting program: /tmp/hello-gl/hello-gl-dummy [New LWP 100089] [New Thread 121404400 (LWP 100089/hello-gl-dummy)] chekpoint 1 ^C Program received signal SIGINT, Interrupt. [Switching to Thread 121404400 (LWP 100089/hello-gl-dummy)] 0x0000000120570880 in poll () from /lib/libc.so.7 (gdb) bt #0 0x0000000120570880 in poll () from /lib/libc.so.7 #1 0x0000000000000000 in ?? () (gdb) Indicating that the program is stuck in poll(2). Does this help find the root cause of the problem? Thanks Anton