RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1250921 - Packet sending fails on short write in sendmsg()
Summary: Packet sending fails on short write in sendmsg()
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: bind
Version: 7.2
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Petr Menšík
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 1250923 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-06 10:07 UTC by Andreas Schneider
Modified: 2017-05-29 12:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-29 12:33:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Andreas Schneider 2015-08-06 10:07:55 UTC
Description of problem:

I've tried to get nsupdate working in our Samba test environment. We use a tool called socket_wrapper [1] to build an isolated network. socket_wrapper is a library passing all socket communications through unix sockets.

socket_wrapper limits the max packet size to 1500 bytes to make it easier to write pcap files.

The function doio_send() uses sendmsg() to send the packet over the wire. nsupdate sends the tsig over a TCP connection. The packet size is 1505 bytes. socket_wrapper limits the packet size to 1500 and sends 1500 bytes, which is the return value. doio_send() detects it (see gdb output below) sets a soft error.

doio_send (sock=sock@entry=0x7ffff7f764b0, dev=0x7ffff7ed0678) at socket.c:1866
1866            if (cc < 0) {
(gdb)
1860            cc = sendmsg(sock->fd, &msghdr, 0);
(gdb) p msghdr
$6 = {msg_name = 0x0, msg_namelen = 0, msg_iov = 0x7ffff303ab70, msg_iovlen = 1, msg_control = 0x0, msg_controllen = 0, msg_flags = 0}
(gdb) n
1861            send_errno = errno;
(gdb) n
1866            if (cc < 0) {
(gdb) p cc
$7 = 1500
(gdb) n
1927            if (cc == 0) {
(gdb) n
1939            dev->n += cc;
(gdb) n
1940            if ((size_t)cc != write_count)
(gdb) p write_count
$8 = 1505


doio_send() should call sendmsg() again and just send the remaining bytes!



[1] https://cwrap.org/socket_wrapper.html

Comment 2 Tomáš Hozza 2015-12-07 12:55:23 UTC
*** Bug 1250923 has been marked as a duplicate of this bug. ***

Comment 3 Martin Sehnoutka 2016-04-21 14:35:29 UTC
Please add steps to reproduce, so I can debug this problem.

Comment 5 Andreas Schneider 2017-05-29 12:33:53 UTC
We will stop using nsupdate in future.


Note You need to log in before you can comment on or make changes to this bug.