Skip to content

Debug ASAN build #57845

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Debug ASAN build #57845

wants to merge 4 commits into from

Conversation

mroeschke
Copy link
Member

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

@WillAyd
Copy link
Member

WillAyd commented Mar 14, 2024

When I try locally on main I see the following:

$ pip install -ve . --no-build-isolation --config-settings=setup-args="-Dbuildtype=debug" --config-settings editable-verbose=true --config-settings=builddir="asan" --config-settings=setup-args="-Db_sanitize=address"
$ ASAN_OPTIONS=detect_leaks=0 LD_PRELOAD=$(gcc -print-file-name=libasan.so) python -m pytest pandas/tests
+ /home/willayd/mambaforge/envs/pandas-dev/bin/ninja
[1/1] Generating write_version_file with a custom command
FAILED: _version_meson.py 
/home/willayd/mambaforge/envs/pandas-dev/bin/python3.10 ../generate_version.py -o _version_meson.py
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
AddressSanitizer:DEADLYSIGNAL
ninja: build stopped: subcommand failed.
ImportError while loading conftest '/home/willayd/clones/pandas/pandas/conftest.py'.
../../mambaforge/envs/pandas-dev/lib/python3.10/site-packages/_pandas_editable_loader.py:268: in find_spec
    tree = self.rebuild()
../../mambaforge/envs/pandas-dev/lib/python3.10/site-packages/_pandas_editable_loader.py:309: in rebuild
    subprocess.run(self._build_cmd, cwd=self._build_path, env=env, stdout=stdout, check=True)
../../mambaforge/envs/pandas-dev/lib/python3.10/subprocess.py:526: in run
    raise CalledProcessError(retcode, process.args,
E   subprocess.CalledProcessError: Command '['/home/willayd/mambaforge/envs/pandas-dev/bin/ninja']' returned non-zero exit status 1.

So might have something to do with the meson step we have to generate a version file up front

@tqa236 tqa236 mentioned this pull request Mar 15, 2024
@mroeschke
Copy link
Member Author

cc @lithomas1 if you have any thoughts here

@mroeschke
Copy link
Member Author

Also I notice that for the version file in meson.build , build_by_default: true and build_always_stale: true which seems like the reason why the version file is always runs when pytest runs. Shouldn't the file version only be build if the git commit changes?

@lithomas1
Copy link
Member

I don't think so. There's no inbuilt mechanism to detect a git commit change.

@lithomas1
Copy link
Member

lithomas1 commented Mar 15, 2024

My hypothesis is that maybe our json module is getting imported instead of the stdlib one by versioneer.
(but maybe we renamed our extension module).

I'm travelling today, but I'll look over the weekend/on Monday.

@lithomas1
Copy link
Member

@WillAyd

Do you have time to debug this further?

I can't really reproduce ASAN stuff locally on my mac and trying to reproduce on Gitpod seems to hang it.

AFAICT, the version script at least runs successfully once.
(since the pandas version is correctly set to 3.0.0dev0 in the wheel filename)

@WillAyd
Copy link
Member

WillAyd commented Mar 16, 2024

Yep will try to take a look in the next few days

@WillAyd
Copy link
Member

WillAyd commented Mar 17, 2024

Does anyone know any tricks to isolating what happens during fixture collection? I am seeing the DEADLYSIGNAL relatively often during fixture collection, but am unsure where all that messaging is going

@mroeschke
Copy link
Member Author

I think --setup-show is the only way to gain insights into what happens during collection

@mroeschke mroeschke closed this Mar 19, 2024
@mroeschke mroeschke deleted the ci/debug branch March 19, 2024 17:02
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.

3 participants