Comments (5)
Hey @rdizio 👋
I've been trying to reproduce it (on Tinker or web requests), but I haven't been able to exhibit your behavior. Would you be able to provide a reproducer (e.g., a sample docker app) for the erroneous behavior?
Thanks!
from dd-trace-php.
Hi @PROFeNoM,
Yes, it seems like the behavior is not consistent for me. I ran new JsonResponse($user);
and I only get the error after the 3er or second attempt. I don't know if this has anything to do with opcache or JIT:
from dd-trace-php.
@PROFeNoM let me know if you are able to replicate the issue. I'm can also send a docker demo app
from dd-trace-php.
Hi @rdizio,
Sorry for the delay. These last few days, I have had many things on my plate and didn't have enough time.
As can be seen in the (shortened) output below, even with JiT enabled, it doesn't seem like I can replicate the behavior (in PHP 8.1, 8.2, and 8.3).
If you can provide us with a docker demo app, then that's obviously ideal for us as that would streamline the investigation 😃 Otherwise, it may be interesting to first:
- Enable the debug logs (I really don't expect anything, but it's always worth a try 🤷)
- Disable JiT to see if the behavior persists. If this is JiT-related, a sample reproducer is even more essential, as the engine may have a particular loophole.
- Find out where this
str_pad
call happens
Thanks for your assistance
> print_r(opcache_get_status());
[...]
[jit] => Array
(
[enabled] => 1
[on] => 1
[kind] => 5
[opt_level] => 5
[opt_flags] => 6
[buffer_size] => 536870896
[buffer_free] => 536069024
)
)
= true
> use App\Models\User;
> use Illuminate\Http\JsonResponse;
> $user = User::first();
[ddtrace] [debug] Loaded integration DDTrace\Integrations\PDO\PDOIntegration
= App\Models\User {#8577
id: 1,
name: "Admin",
email: "[email protected]",
#password: "$2y$10$RGjHiTCfFaVsrIr.AJBfOOGIOEn8xQCz7FthWFLzdzKPK7KM4zBf2",
#remember_token: null,
created_at: null,
updated_at: null,
}
> new JsonResponse($user);
= Illuminate\Http\JsonResponse {#8569
+headers: Symfony\Component\HttpFoundation\ResponseHeaderBag {#129},
+original: App\Models\User {#8577
id: 1,
name: "Admin",
email: "[email protected]",
#password: "$2y$10$RGjHiTCfFaVsrIr.AJBfOOGIOEn8xQCz7FthWFLzdzKPK7KM4zBf2",
#remember_token: null,
created_at: null,
updated_at: null,
},
+exception: null,
}
> new JsonResponse($user);
= Illuminate\Http\JsonResponse {#8939
+headers: Symfony\Component\HttpFoundation\ResponseHeaderBag {#110},
+original: App\Models\User {#8577
id: 1,
name: "Admin",
email: "[email protected]",
#password: "$2y$10$RGjHiTCfFaVsrIr.AJBfOOGIOEn8xQCz7FthWFLzdzKPK7KM4zBf2",
#remember_token: null,
created_at: null,
updated_at: null,
},
+exception: null,
}
[...]
from dd-trace-php.
Hi @PROFeNoM, sorry for the delay. I stoped trying to replicate the issue from another env for all this time. I came back later to it, and the issue stopped after disabling the JIT. Also, I debugged the issue, and I found out the issue stops when I tried to retrive or get access to the value of length in this file from the Carbon library.
/nesbot/carbon/src/Carbon/Traits/Date.php
I added a patch over that file just printing the value, the error stops. That's when I decided to disable the JIT and the problem stoped completely. I don't know why this would happen after enabling datadog with JIT enable, but it seems to be causing some issues.
from dd-trace-php.
Related Issues (20)
- [Feature] Missing instrumentation for batched AMQP publishing
- [Bug]: Integrations being added as Services in the APM UI HOT 1
- [Help]: Configurations in Docker and kubernetes HOT 9
- [Bug]: Memory leak with DD_APPSEC_ENABLED="false" HOT 3
- Standalone install from IPv6-only server HOT 4
- [Bug]: post-install.sh does not detect the 'json' extension on PHP 8.1.29 HOT 5
- [Bug]: Failed connecting to the sidecar HOT 2
- [Bug]: WordPress Integration is incomplete HOT 4
- [Feature] Include max memory usage in root span HOT 4
- [Bug]: Trace ids are no longer cascaded on next spans after `Tracer::extract(Format::TEXT_MAP)` & using context on `startxSpan` HOT 1
- [Bug]: `datadog-setup.php` script is not usable when installed with composer.json
- [Feature] `DD_TRACE_REMOVE_AUTOINSTRUMENTATION_ORPHANS` does not remove PDO spans for the `laravelqueue` integration HOT 5
- [Bug]: \DDTrace\current_context trace_id does not match \DDTrace\logs_correlation_trace_id() HOT 3
- [Bug]: Crash in OpenTelemetry Span::getCurrent() when accessing span link from auto instrumentation HOT 2
- [Bug]: Xdebug skips breakpoints after Psr\Log\LoggerInterface methods are called, only when DDTrace is enabled HOT 3
- [Bug]: Laravel $dontReport does not have any affect on CLI HOT 1
- [Bug]: cannot install datadog on windows php HOT 9
- [Bug]: [Heroku] [Stack: heroku-24] Previously working deployments suddenly stopped with "ERROR: Required PHP extension 'json' not found." HOT 7
- [Bug]: Using --ini option duplicate "export=" declaration|" HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dd-trace-php.