On Wed, Sep 26, 2012 at 09:20:25AM +0100, Nicholas Marriott wrote:
> Are you running a tmux command from any shell script or cron or
> anything?
I used X11 (cwm).
I open a terminal (rxvt), maximize size, and run:
$ tmux attach -d -t semarie
(normally, via an alias)
> There are only two places tmux itself opens /dev/null and they are both
> after fork so this must be /dev/null passed with imsg from a client.
>
> Also please should me output of "tmux info".
(in a ksh in the session)
semarie@bert:~$ tmux info
semarie@bert:~$ echo $?
1
semarie@bert:~$
so via the tmux command-line ("C-b :" + info)
pid 1509, started Sat Sep 15 10:17:49 2012
[137/137]
socket path /tmp/tmux-1000/default, debug level 0
system is OpenBSD 5.2 GENERIC.MP#20 i386
configuration file is /home/semarie/.tmux.conf
protocol version is 7
Clients:
0: /dev/ttyp3 (5, 7): semarie [80x24 rxvt-256color bs=177 xterm=95]
[flags=0x1/0x3b, references=0]
Sessions: [5/10]
0: semarie: 4 windows (created Sat Sep 15 10:17:49 2012) [127x42] [flags=0x0]
1: ksh [127x42] [flags=0x8, references=1, last layout=-1]
0: /dev/ttyp5 24460 131 1/42, 80 bytes; UTF-8 0/42, 0 bytes
2: ksh [127x42] [flags=0x8, references=1, last layout=-1]
0: /dev/ttyp6 19418 421 3/42, 285 bytes; UTF-8 0/42, 0 bytes
3: ksh [127x42] [flags=0x8, references=1, last layout=-1]
0: /dev/ttyp2 2926 10 4/21, 405 bytes; UTF-8 0/21, 0 bytes
4: ksh [127x42] [flags=0x8, references=1, last layout=-1]
0: /dev/ttyp1 29566 185 153/156, 45190 bytes; UTF-8 2/156, 880 bytes
Terminals:
[117/137]
rxvt-256color [references=1, flags=0x1]:
1: acsc: (string) ``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~
0: AX: (flag) true
2: bel: (string) \007
3: blink: (string) \033[5m
4: bold: (string) \033[1m
5: Cc: [missing]
6: civis: (string) \033[?25l
7: clear: (string) \033[H\033[2J
8: cnorm: (string) \033[?25h
9: colors: (number) 256
10: Cr: [missing]
11: Cs: [missing]
12: csr: (string) \033[%i%p1%d;%p2%dr
13: Csr: [missing]
14: cub: (string) \033[%p1%dD
15: cub1: (string) \010
16: cud: (string) \033[%p1%dB
17: cud1: (string) \012
18: cuf: (string) \033[%p1%dC
19: cuf1: (string) \033[C
20: cup: (string) \033[%i%p1%d;%p2%dH
21: cuu: (string) \033[%p1%dA
22: cuu1: (string) \033[A
23: dch: [missing]
24: dch1: [missing]
25: dim: [missing]
26: dl: (string) \033[%p1%dM
27: dl1: (string) \033[M
28: E3: [missing]
29: el: (string) \033[K
30: el1: (string) \033[1K
31: enacs: (string) \033(B\033)0
32: fsl: (string) \007
33: home: (string) \033[H
34: hpa: (string) \033[%i%p1%dG
35: ich: (string) \033[%p1%d@
36: ich1: (string) \033[@
37: il: (string) \033[%p1%dL
38: il1: (string) \033[L
39: invis: [missing]
40: is1: (string) \033[?47l\033=\033[?1l
[75/137]
41: is2: (string) \033[r\033[m\033[2J\033[H\033[?7h\033[?1;3;4;6l\033[4l
42: is3: [missing]
43: kcbt: (string) \033[Z
44: kcub1: (string) \033[D
45: kcud1: (string) \033[B
46: kcuf1: (string) \033[C
47: kcuu1: (string) \033[A
48: kDC: (string) \033[3$
49: kDC3: [missing]
50: kDC4: [missing]
51: kDC5: (string) \033[3^
52: kDC6: (string) \033[3@
53: kDC7: [missing]
54: kdch1: (string) \033[3~
55: kDN: (string) \033[b
56: kDN3: [missing]
57: kDN4: [missing]
58: kDN5: (string) \033Ob
59: kDN6: [missing]
60: kDN7: [missing]
61: kend: (string) \033[8~
62: kEND: (string) \033[8$
63: kEND3: [missing]
64: kEND4: [missing]
65: kEND5: (string) \033[8^
66: kEND6: (string) \033[8@
67: kEND7: [missing]
68: kf1: (string) \033[11~
69: kf10: (string) \033[21~
70: kf11: (string) \033[23~
71: kf12: (string) \033[24~
72: kf13: (string) \033[25~
73: kf14: (string) \033[26~
74: kf15: (string) \033[28~
75: kf16: (string) \033[29~
76: kf17: (string) \033[31~
77: kf18: (string) \033[32~
78: kf19: (string) \033[33~
79: kf2: (string) \033[12~
80: kf20: (string) \033[34~
81: kf3: (string) \033[13~
82: kf4: (string) \033[14~
83: kf5: (string) \033[15~
84: kf6: (string) \033[17~
85: kf7: (string) \033[18~
86: kf8: (string) \033[19~
87: kf9: (string) \033[20~
88: kHOM: (string) \033[7$
89: kHOM3: [missing]
90: kHOM4: [missing]
91: kHOM5: (string) \033[7^
92: kHOM6: (string) \033[7@
93: kHOM7: [missing]
94: khome: (string) \033[7~
95: kIC: (string) \033[2$
96: kIC3: [missing]
97: kIC4: [missing]
98: kIC5: (string) \033[2^
99: kIC6: (string) \033[2@
100: kIC7: [missing]
101: kich1: (string) \033[2~
102: kLFT: (string) \033[d
103: kLFT3: [missing]
104: kLFT4: [missing]
105: kLFT5: (string) \033Od
106: kLFT6: [missing]
107: kLFT7: [missing]
108: kmous: (string) \033[M
109: knp: (string) \033[6~
110: kNXT: (string) \033[6$
111: kNXT3: [missing]
112: kNXT4: [missing]
113: kNXT5: (string) \033[6^
114: kNXT6: (string) \033[6@
115: kNXT7: [missing]
116: kpp: (string) \033[5~
117: kPRV: (string) \033[5$
118: kPRV3: [missing]
119: kPRV4: [missing]
120: kPRV5: (string) \033[5^
121: kPRV6: (string) \033[5@
122: kPRV7: [missing]
123: kRIT: (string) \033[c
124: kRIT3: [missing]
125: kRIT4: [missing]
126: kRIT5: (string) \033Oc
127: kRIT6: [missing]
128: kRIT7: [missing]
129: kUP: (string) \033[a
130: kUP3: [missing]
131: kUP4: [missing]
132: kUP5: (string) \033Oa
133: kUP6: [missing]
134: kUP7: [missing]
135: Ms: [missing]
136: op: (string) \033[39;49m
137: rev: (string) \033[7m
138: ri: (string) \033M
139: rmacs: (string) \017
140: rmcup: (string) \033[2J\033[?47l\0338
141: rmkx: (string) \033>
142: setab: (string)
\033[%?%p1%{8}%<%t4%p1%d%e%p1%{16}%<%t10%p1%{8}%-%d%e48;5;%p1%d%;m
143: setaf: (string)
\033[%?%p1%{8}%<%t3%p1%d%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;%p1%d%;m
144: sgr0: (string) \033[m\017
145: sitm: [missing]
146: smacs: (string) \016
147: smcup: (string) \0337\033[?47h
148: smkx: (string) \033=
149: smso: (string) \033[7m
150: smul: (string) \033[4m
151: tsl: (string) \033]0;
152: vpa: (string) \033[%i%p1%dd
153: xenl: (flag) true
154: XT: (flag) true
Jobs:
That's all.
The session is like that:
- 4 windows opened, with just ksh in each windows
Thanks.
--
Sebastien Marie
>
> On Wed, Sep 26, 2012 at 09:29:50AM +0200, S?bastien Marie wrote:
> > Hi,
> >
> > I'm running -current (not latest, only GENERIC.MP#20), see dmesg below.
> >
> > I run in a error in tmux (a long session: 10 days for now), when a want to
> > create a new window (C-b C-c), I have this error:
> >
> > Create window failed: exec ksh: Too many open files
> >
> > Note, my default shell in tmux.conf is "exec ksh" (see ~/.tmux.conf below)
> >
> >
> > My limit for open files are standard:
> > semarie@bert:~$ ulimit -n
> > 512
> >
> >
> > Currently, I have only 4 windows in this sessions, but:
> >
> > semarie@bert:~$ fstat -u semarie | grep tmux
> > semarie tmux 3941 wd /home 4053504 drwx------ r 2560
> > semarie tmux 3941 0 / 17084 crw--w---- rw ttyp5
> > semarie tmux 3941 1 / 17084 crw--w---- rw ttyp5
> > semarie tmux 3941 2 / 17084 crw--w---- rw ttyp5
> > semarie tmux 3941 3 kqueue 0xd8c0f3d4 0 state: W
> > semarie tmux 3941 4 /home 4053890 -rw-r--r-- r 1859
> > semarie tmux 3941 5* unix stream 0xd31c7680 <-> 0xd4105380
> > semarie tmux 1509 wd /home 4053504 drwx------ r 2560
> > semarie tmux 1509 0 / 17621 crw-rw-rw- rw null
> > semarie tmux 1509 1 / 17621 crw-rw-rw- rw null
> > semarie tmux 1509 2 / 17621 crw-rw-rw- rw null
> > semarie tmux 1509 3 kqueue 0xd8c0f310 0 state: W
> > semarie tmux 1509 4 /home 4053942 -rw-r--r-- r 1805
> > semarie tmux 1509 5* unix stream 0xd4105380 <-> 0xd31c7680
> > semarie tmux 1509 6* unix stream 0xd3228740
> > semarie tmux 1509 7 / 17084 crw--w---- rw ttyp5
> > semarie tmux 1509 9 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 10 / 17079 crw-rw-rw- rw ptyp2
> > semarie tmux 1509 11 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 12 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 13 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 14 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 15 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 16 / 17621 crw-rw-rw- r null
> > [...]
> > semarie tmux 1509 503 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 504 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 505 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 506 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 507 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 508 / 17621 crw-rw-rw- r null
> > semarie tmux 1509 509 / 17618 crw-rw-rw- r tty
> > semarie tmux 1509 510 / 17618 crw-rw-rw- r tty
> >
> > There are 510 descriptors opened...
> >
> > Any hints ?
> >
> > Does tmux could not closed not-need descriptors for old created windows ?
> >
> > It will try too keep this session running for debug if need...
> >
> > I could also upgrade to latest snapshot if needed. But I don't show any
> > commit to tmux that seems related to that. But I could be wrong: please let
> > me know.
> >
> > Thanks.
> > --
> > Sebastien Marie
> >
> > My ~/.tmux.conf
> >
> > set -g default-command "exec ksh"
> > set -g status-right "#(sysctl -n vm.loadavg)"
> >
> > # Statusbar properties.
> > set -g display-time 3000
> > set -g status-bg black
> > set -g status-fg cyan
> > set-window-option -g window-status-current-attr bright,reverse
> > set-window-option -g window-status-current-bg cyan
> > set-window-option -g window-status-current-fg black
> >
> > # divers
> > set -g default-path ""
> > set -g bell-action any
> > set -g set-titles on
> > set -g base-index 1
> > set -g history-limit 5000
> > set -g update-environment "DISPLAY WINDOWID SSH_ASKPASS SSH_AUTH_SOCK
> > SSH_AGENT_PID SSH_CONNECTION DBUS_SESSION_BUS_ADDRESS XDG_SESSION_COOKIE
> > KRB5CCNAME"
> >
> >
> > My dmesg:
> >
> > OpenBSD 5.2-current (GENERIC.MP) #20: Tue Sep 11 11:54:03 MDT 2012
> > [email protected]:/usr/src/sys/arch/i386/compile/GENERIC.MP
> > cpu0: Genuine Intel(R) CPU T2400 @ 1.83GHz ("GenuineIntel" 686-class) 1.83
> > GHz
> > cpu0:
> > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM
> > real mem = 2137399296 (2038MB)
> > avail mem = 2091552768 (1994MB)
> > mainbus0 at root
> > bios0 at mainbus0: AT/286+ BIOS, date 03/09/06, BIOS32 rev. 0 @ 0xffa10,
> > SMBIOS rev. 2.4 @ 0xf7b70 (44 entries)
> > bios0: vendor Dell Inc. version "A03" date 03/09/2006
> > bios0: Dell Inc. MM061
> > acpi0 at bios0: rev 0
> > acpi0: sleep states S0 S3 S4 S5
> > acpi0: tables DSDT FACP APIC MCFG BOOT SSDT
> > acpi0: wakeup devices LID_(S3) PBTN(S4) PCI0(S3) USB0(S0) USB1(S0) USB2(S0)
> > USB3(S0) EHCI(S0) CH31(S0) AZAL(S3) PCIE(S4) RP01(S4) RP02(S3) RP03(S3)
> > RP04(S3) RP05(S3) RP06(S3)
> > acpitimer0 at acpi0: 3579545 Hz, 24 bits
> > acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
> > cpu0 at mainbus0: apid 0 (boot processor)
> > cpu0: apic clock running at 166MHz
> > cpu1 at mainbus0: apid 1 (application processor)
> > cpu1: Genuine Intel(R) CPU T2400 @ 1.83GHz ("GenuineIntel" 686-class) 1.83
> > GHz
> > cpu1:
> > FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,NXE,SSE3,MWAIT,VMX,EST,TM2,xTPR,PDCM
> > ioapic0 at mainbus0: apid 2 pa 0xfec00000, version 20, 24 pins
> > ioapic0: misconfigured as apic 0, remapped to apid 2
> > acpimcfg0 at acpi0 addr 0xe0000000, bus 0-63
> > acpiprt0 at acpi0: bus 0 (PCI0)
> > acpiprt1 at acpi0: bus -1 (AGP_)
> > acpiprt2 at acpi0: bus 3 (PCIE)
> > acpiprt3 at acpi0: bus 11 (RP01)
> > acpiprt4 at acpi0: bus -1 (RP02)
> > acpiprt5 at acpi0: bus -1 (RP03)
> > acpiprt6 at acpi0: bus 12 (RP04)
> > acpiprt7 at acpi0: bus -1 (RP05)
> > acpiprt8 at acpi0: bus -1 (RP06)
> > acpicpu0 at acpi0: C3, C2, C1, PSS
> > acpicpu1 at acpi0: C3, C2, C1, PSS
> > acpitz0 at acpi0: critical temperature is 126 degC
> > acpiac0 at acpi0: AC unit online
> > acpibat0 at acpi0: BAT0 model " DELLUD2649" serial 878 type LION oem "Sanyo"
> > acpibtn0 at acpi0: LID_
> > acpibtn1 at acpi0: PBTN
> > acpibtn2 at acpi0: SBTN
> > acpivideo0 at acpi0: VID_
> > acpivideo1 at acpi0: VID_
> > acpivideo2 at acpi0: VID2
> > bios0: ROM list: 0xc0000/0xe800! 0xce800/0x1800
> > cpu0: Enhanced SpeedStep 1829 MHz: speeds: 1833, 1333, 1000 MHz
> > pci0 at mainbus0 bus 0: configuration mode 1 (bios)
> > pchb0 at pci0 dev 0 function 0 "Intel 82945GM Host" rev 0x03
> > vga1 at pci0 dev 2 function 0 "Intel 82945GM Video" rev 0x03
> > wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
> > wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
> > intagp0 at vga1
> > agp0 at intagp0: aperture at 0xc0000000, size 0x10000000
> > inteldrm0 at vga1: apic 2 int 16
> > drm0 at inteldrm0
> > "Intel 82945GM Video" rev 0x03 at pci0 dev 2 function 1 not configured
> > azalia0 at pci0 dev 27 function 0 "Intel 82801GB HD Audio" rev 0x01: msi
> > azalia0: codecs: Sigmatel STAC9200, Conexant/0x2bfa, using Sigmatel STAC9200
> > audio0 at azalia0
> > ppb0 at pci0 dev 28 function 0 "Intel 82801GB PCIE" rev 0x01: apic 2 int 16
> > pci1 at ppb0 bus 11
> > wpi0 at pci1 dev 0 function 0 "Intel PRO/Wireless 3945ABG" rev 0x02: msi,
> > MoW2, address 00:13:02:2e:8b:46
> > ppb1 at pci0 dev 28 function 3 "Intel 82801GB PCIE" rev 0x01: apic 2 int 19
> > pci2 at ppb1 bus 12
> > uhci0 at pci0 dev 29 function 0 "Intel 82801GB USB" rev 0x01: apic 2 int 20
> > uhci1 at pci0 dev 29 function 1 "Intel 82801GB USB" rev 0x01: apic 2 int 21
> > uhci2 at pci0 dev 29 function 2 "Intel 82801GB USB" rev 0x01: apic 2 int 22
> > uhci3 at pci0 dev 29 function 3 "Intel 82801GB USB" rev 0x01: apic 2 int 23
> > ehci0 at pci0 dev 29 function 7 "Intel 82801GB USB" rev 0x01: apic 2 int 20
> > usb0 at ehci0: USB revision 2.0
> > uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
> > ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xe1
> > pci3 at ppb2 bus 3
> > bce0 at pci3 dev 0 function 0 "Broadcom BCM4401B1" rev 0x02: apic 2 int 17,
> > address 00:15:c5:0b:8b:7a
> > bmtphy0 at bce0 phy 1: BCM4401 10/100baseTX PHY, rev. 0
> > "Ricoh 5C832 Firewire" rev 0x00 at pci3 dev 1 function 0 not configured
> > sdhc0 at pci3 dev 1 function 1 "Ricoh 5C822 SD/MMC" rev 0x19: apic 2 int 18
> > sdmmc0 at sdhc0
> > "Ricoh 5C843 MMC" rev 0x01 at pci3 dev 1 function 2 not configured
> > "Ricoh 5C592 Memory Stick" rev 0x0a at pci3 dev 1 function 3 not configured
> > "Ricoh 5C852 xD" rev 0x05 at pci3 dev 1 function 4 not configured
> > ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x01: PM
> > disabled
> > pciide0 at pci0 dev 31 function 2 "Intel 82801GBM SATA" rev 0x01: DMA,
> > channel 0 wired to compatibility, channel 1 wired to compatibility
> > wd0 at pciide0 channel 0 drive 0: <Hitachi HTS541616J9SA00>
> > wd0: 16-sector PIO, LBA48, 152627MB, 312581808 sectors
> > wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
> > atapiscsi0 at pciide0 channel 1 drive 0
> > scsibus0 at atapiscsi0: 2 targets
> > cd0 at scsibus0 targ 0 lun 0: <_NEC, DVD+-RW ND-6650A, 102C> ATAPI 5/cdrom
> > removable
> > cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
> > ichiic0 at pci0 dev 31 function 3 "Intel 82801GB SMBus" rev 0x01: apic 2
> > int 17
> > iic0 at ichiic0
> > spdmem0 at iic0 addr 0x50: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
> > spdmem1 at iic0 addr 0x52: 1GB DDR2 SDRAM non-parity PC2-5300CL5 SO-DIMM
> > usb1 at uhci0: USB revision 1.0
> > uhub1 at usb1 "Intel UHCI root hub" rev 1.00/1.00 addr 1
> > usb2 at uhci1: USB revision 1.0
> > uhub2 at usb2 "Intel UHCI root hub" rev 1.00/1.00 addr 1
> > usb3 at uhci2: USB revision 1.0
> > uhub3 at usb3 "Intel UHCI root hub" rev 1.00/1.00 addr 1
> > usb4 at uhci3: USB revision 1.0
> > uhub4 at usb4 "Intel UHCI root hub" rev 1.00/1.00 addr 1
> > isa0 at ichpcib0
> > isadma0 at isa0
> > pckbc0 at isa0 port 0x60/5
> > pckbd0 at pckbc0 (kbd slot)
> > pckbc0: using irq 1 for kbd slot
> > wskbd0 at pckbd0: console keyboard, using wsdisplay0
> > pms0 at pckbc0 (aux slot)
> > pckbc0: using irq 12 for aux slot
> > wsmouse0 at pms0 mux 0
> > pms0: Synaptics touchpad, firmware 6.2
> > pcppi0 at isa0 port 0x61
> > spkr0 at pcppi0
> > npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
> > mtrr: Pentium Pro MTRR support
> > vscsi0 at root
> > scsibus1 at vscsi0: 256 targets
> > softraid0 at root
> > scsibus2 at softraid0: 256 targets
> > root on wd0a (3ed108d2b4f1280b.a) swap on wd0b dump on wd0b
> > sd0 at scsibus2 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
> > sd0: 51200MB, 512 bytes/sector, 104857680 sectors