Skip to content

Conversation

@mwilck
Copy link
Collaborator

@mwilck mwilck commented Jan 23, 2026

multipath-tools 0.14.1, 2026/01

This is a minor update to incorporate some valuable patches from Ben that arrived shortly after the 0.14.0 release.

Bug fixes

  • kpartx: Fix freeing static buffer when operating on regular files.
    Fixes 0.14.0. Commit f8575c8.
    Fixes #139.
  • Fix initialization of paths that were offline during path detection.
    Commit 1942fb1.
  • Fix printing the "path offline" log message for offline paths that don't
    have a path checker configured. Commit 1a364a1.

Other changes

  • If path devices that are members of multipath maps aren't detected during
    multipathd startup or reconfigure, don't add them to newly created maps
    in the first place. In previous versions, such paths would be added to the
    maps, only to be removed later. Commit a04be55.
  • Improve the detection of "busy" state in the show status command, such
    that reading udev events from udevd is also counted as busy.
    Commit 7fdd93b.

Shortlog

@bmarzins (4):
multipathd: don't add removed/partial paths to new maps
multipathd: finish initalization of paths added while offline
multipathd: make "multipathd show status" busy checker better
multipathd: print path offline message even without a checker

@mwilck (5):
GitHub workflows: spelling: add path restrictions for PRs
GitHub workflows: spelling: add pattern for 7-digit commit IDs
kpartx: fix segfault when operating on regular files
Update NEWS.md
libmultipath: bump version to 0.14.1

During configure(), when the old multipath devices are added in
map_discovery(), it's possible that they have paths in the INIT_PARTIAL
or INIT_REMOVED state. These paths were not found during
path_discovery(). Don't add them to the new multipath maps.
coalesce_maps() will make sure that they point to the old maps, so they
will get cleaned up when those maps are removed.

Reviewed-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
If a path in a mulitpath device is offline while multipathd is
reconfigured, it will get added to the updated multipath device, just
like it was in the old multipath device. However the device will still
be in the INIT_NEW state because it can't get initilized while offline.
This is different than the INIT_PARTIAL state because the path was
discovered in path_discovery(). INIT_PARTIAL is for paths that
multipathd did not discover in path_discovery() or receive a uevent for,
but are part of a multipath device that was added, and which should
receive a uevent shortly. There is no reason to expect a uevent for
these offline paths.

When the path comes back online, multipathd will run the checker and
prioritizer on it. The only two pathinfo checks that won't happen
are the DI_WWID and DI_IOCTL ones. Modify pathinfo() to make sure
that if DI_IOCTL was skipped for offline paths, it gets called the
next time pathinfo() is called after the fd can be opened. Also,
make sure that when one of these offline paths becomes usable, its
WWID is rechecked. With those changes, all the DI_ALL checks will
be accounted for, and the path can be marked INIT_OK.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
while uevent_listen() was grabbing new uevents, "multipathd show status"
would still show show busy as "False". Add a check there, to make catch
multipathd's uevent processing earlier. Also, access servicing_uev (as
well as the new variable, adding_uev) atomically, just to make sure that
the compiler doesn't do stupid things trying to optimize them.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
If a path has a checker selected and is offline, multipathd will print a
"path offline" message. However if the checker isn't selected, for
instance because multipathd was started or reconfigured while the path
was offline, multipathd was not printing the "path offline" message.
Fix that.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
@mwilck mwilck requested a review from bmarzins January 23, 2026 10:58
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@mwilck
Copy link
Collaborator Author

mwilck commented Jan 23, 2026

Speling trobles again, sory.

We were only applying path restrictions for push events. Apply the
same restrictions also for PRs.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin Wilck <mwilck@suse.com>
@mwilck mwilck force-pushed the queue branch 3 times, most recently from 1953a7a to 5b84a04 Compare January 26, 2026 11:42
The following problem has been introduced in multipath-tools 0.14.0:

> truncate -s1G /tmp/img
> kpartx -a /tmp/img
double free or corruption (out)
Aborted                    (core dumped) kpartx -a /tmp/img

Fix it by always allocating "uuid" on the heap, rather than
using a static char array.

Fixes: 8c39e60 ("kpartx: fix some memory leaks")
Fixes: opensvc#139
Signed-off-by: Martin Wilck <mwilck@suse.com>
@mwilck
Copy link
Collaborator Author

mwilck commented Jan 26, 2026

I'm sorry for the many force-pushs. I got a little nervous over #139.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kpartx: Memory bug (free(): invalid size)

2 participants