The Windows Universal C Runtime (ucrt) "_creat" function is no
longer POSIX compatible and requires Windows specific mode flags.
We got admin socket test failures after switching from msvcrt to
uscrt.
We'll address the issue with some platform checks.
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Windows CLI arguments use either ANSI (main()) or UTF-16 (wmain()).
Meanwhile, Ceph libraries expect UTF-8 and raise exceptions when
trying to use Unicode CLI arguments or log Unicode output:
rbd.exe create test_unicode_șțăâ --size=32M
terminate called after throwing an instance of 'std::runtime_error'
what(): invalid utf8
We'll use a Windows application manifest, setting the "activeCodePage"
property [1][2]. This enables the Windows UCRT UTF-8 mode so that
functions that receive char* arguments will expect UTF-8 instead of ANSI,
including main(). One exception is CreateProcess, which will need the
UTF-16 form (CreateProcessW).
Despite the locale being set to utf-8, we'll have to explicitly set
the console output to utf-8 using SetConsoleOutputCP(CP_UTF8).
In order to use the UTF-8 locale, we'll have to switch the mingw-llvm
runtime from msvcrt to ucrt.
This also fixes ceph-dokan crashes that currently occur when non-ANSI
paths are logged.
[1] https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests#activecodepage
[2] https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page
Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
Edit the section "Recovering a monitor's broken monmap" in
doc/rados/troubleshooting/troubleshooting-mon.rst.
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
[161/715] Building CXX object src/crush/CMakeFiles/crush_objs.dir/CrushTester.cc.o
ceph/src/crush/CrushTester.cc:478:7: warning: variable 'num_devices_active' set but not used [-Wunused-but-set-variable]
int num_devices_active = 0;
^
1 warning generated.
[165/715] Building CXX object src/crush/CMakeFiles/crush_objs.dir/CrushWrapper.cc.o
ceph/src/crush/CrushWrapper.cc:1579:9: warning: variable 'local_changed' set but not used [-Wunused-but-set-variable]
int local_changed = 0;
^
Signed-off-by: Casey Bodley <cbodley@redhat.com>
when called on a versioned object, prepare() may follow olh and look up
a different object instance
but when called on a multipart part, we should not overwrite the
original object name with the part's object name (of the form
mymultipart.2~_XLFNqOW0NuiALg7q4-Hi_7hdtAkZUH.1)
Signed-off-by: Casey Bodley <cbodley@redhat.com>
add an overload to expose the manifest storage to callers of
get_obj_state(). the existing RGWObjState+RGWObjManifest overload
just calls the RGWObjStateManifest one
Signed-off-by: Casey Bodley <cbodley@redhat.com>
If do_cmake.sh is being exeuted on Fedora 39 set Python version to 3.12.
Remove versions for anything earlier than Fedora 37
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
Add a new exception based on jinja2's template not found exception for
the case where the template was not found in the zip(app). We've been
having sporadic failures with this in CI & testing and hopefully
the additional information will help pinpoint the cause.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Adding 'typename' in two instances, where version 15 of Clang
still requires it. P0634R3, which made those 'typename' redundant,
is only supported starting Clang 16.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Edit the section "Understanding mon_status" in
doc/rados/troubleshooting/troubleshooting-mon.rst.
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
This will be very important to get to know what exactly has happened
when client get a very large number of extents.
URL: https://tracker.ceph.com/issues/63586
Signed-off-by: Xiubo Li <xiubli@redhat.com>
`lock_lambda` captures `ret` by reference, it will overwrites
returned value of `bucket_lc_process` when `wait_backoff` is called.
Fixes: c069eb7ff0.
Signed-off-by: Tongliang Deng <dengtongliang@gmail.com>
The ordering is now guaranteed upon calling send(), so there is no
reason to couple the crosscore send future with the operation phases --
exclusive phases will limit the send concurrency, potentially causing
OSD starvation.
Decouple the crosscore send futures in the IO pathes, mostly in
ClientRequest and OSDSingletonState::send_to_osd().
Issue-identified-by: Chunmei Liu <chunmei.liu@intel.com>
see PR53934.
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
Update "Quincy" to "Reef" and "Pacific" to "Quincy" in the section
"Viewing Old Ceph Documentation" in /doc/start/documenting-ceph.rst.
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com>
Signed-off-by: Zac Dover <zac.dover@proton.me>
Edit the section "Using the Monitor's Admin Socket" in
doc/rados/troubleshooting/troubleshooting-mon.rst.
Signed-off-by: Zac Dover <zac.dover@proton.me>
```
// SnapTrimEvent is a background operation,
// it's lifetime is not guarnteed since the caller
// returned future is being ignored. We should capture
// a self reference thourhgout the entire execution
// progress (not only on finally() continuations).
// See: PG::on_active_actmap()
```
Sanitized backtrace:
```
DEBUG 2023-11-16 08:42:48,441 [shard 0] osd - snaptrim_event(id=21122, detail=SnapTrimEvent(pgid=3.1 snapid=3cb needs_pause=1)): interrupted crimson::common::actingset_changed (acting set changed
kernel callstack:
#0 0x55e310e0ace7 in seastar::shared_mutex::unlock() (/usr/bin/ceph-osd+0x1edd0ce7)
#1 0x55e313325d9c in auto seastar::futurize_invoke<crimson::OrderedConcurrentPhaseT<crimson::osd::SnapTrimEvent::WaitSubop>::ExitBarrier<crimson::OrderedConcurrentPhaseT<crimson::osd::SnapTrimEvent::WaitSubop>::BlockingEvent::Trigger<crimson::osd::SnapTrimEvent> >::exit()::{lambda()#1}&>(crimson::OrderedConcurrentPhaseT<crimson::osd::SnapTrimEvent::WaitSubop>::ExitBarrier<crimson::OrderedConcurrentPhaseT<crimson::osd::SnapTrimEvent::WaitSubop>::BlockingEvent::Trigger<crimson::osd::SnapTrimEvent> >::exit()::{lambda()#1}&) (/usr/bin/ceph-osd+0x212ebd9c)
#2 0x55e3133260ef in _ZN7seastar20noncopyable_functionIFNS_6futureIvEEvEE17direct_vtable_forIZNS2_4thenIZN7crimson23OrderedConcurrentPhaseTINS7_3osd13SnapTrimEvent9WaitSubopEE11ExitBarrierINSC_13BlockingEvent7TriggerISA_EEE4exitEvEUlvE_S2_EET0_OT_EUlDpOT_E_E4callEPKS4_ (/usr/bin/ceph-osd+0x212ec0ef)
0x61500013365c is located 92 bytes inside of 472-byte region [0x615000133600,0x6150001337d8)
freed by thread T2 here:
#0 0x7fb345ab73cf in operator delete(void*, unsigned long) (/lib64/libasan.so.6+0xb73cf)
#1 0x55e313474863 in crimson::osd::SnapTrimEvent::~SnapTrimEvent() (/usr/bin/ceph-osd+0x2143a863)
previously allocated by thread T2 here:
#0 0x7fb345ab6367 in operator new(unsigned long) (/lib64/libasan.so.6+0xb6367)
#1 0x55e31183ac18 in auto crimson::OperationRegistryI::create_operation<crimson::osd::SnapTrimEvent, crimson::osd::PG*, SnapMapper&, snapid_t const&, bool const&>(crimson::osd::PG*&&, SnapMapper&, snapid_t const&, bool const&) (/usr/bin/ceph-osd+0x1f800c18)
SUMMARY: AddressSanitizer: heap-use-after-free (/usr/bin/ceph-osd+0x1edd0ce7) in seastar::shared_mutex::unlock()
```
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
Previously, submit_error_log was chained to failure_func
returned future.
Now submit_error_log is called from within do_osd_ops_execute
Fixes: https://tracker.ceph.com/issues/61651
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
```
submit_error_log records the result of an IO into the pg log so that we can return
the same error code if the client resends the request.
This should only be relevant for logical errors resulting from the target object state
-- for example, EEXIST returned on an exclusive create -- because there is application
logic built to rely on them.
In classic, the only such site is if the return value from do_osd_ops is negative
(or the transaction is empty) -- see PrimaryLogPG::prepare_transaction,
specifically where we set update_log_only to true.
We do not want to record space usage errors or errors specific to conditions on the primary
OSD such as IO errors -- submit_error_log isn't a catch-all error path.
```
Signed-off-by: Matan Breizman <mbreizma@redhat.com>